Possible Plugin Outlet use conflict


(Mittineague) #1

Continuing the discussion from Removing `Discourse` from handlebars templates:

I changed the DEPRECATIONs from {{#if Discourse.SiteSettings.___ to {{#if controller.siteSettings.___ and all looked well.

Until I installed the Solved plugin to give it a spin.

It seems that if the plugin-outlet-locations plugin is installed it breaks the Solved plugins use of topic-after-cooked so that it leaves only a comment Uninstalling the plugin-outlet-locations plugin fixes the Solved Plugin problem.

<div class="ember-view" id="ember1975">
  <div class="ember-view topic-after-cooked-outlet topic-after-cooked" id="ember1980">
    <span class="in-post">
      <i class="fa fa-plug"></i>
  Topic After Cooked plugin outlet location is here
    </span>
  </div>
  <div class="ember-view topic-after-cooked-outlet solved-panel" id="ember1985">
    <!---->
  </div>
</div>

The plugin-outlet-locations plugin shares plugin outlets With Tagger and Akismet without breaking those.
And it doesn’t break the Category modal or the approved answer checkmark, only the display of “solved by ___ post #__” in the first post.

Sorry, I have no idea why it’s breaking that outlet, but if it is a conflict issue I would be grateful to know the fix. I certainly don’t want any of my plugins breaking other plugins.


(Robin Ward) #2

One thing that strikes me as wrong is you’re not giving your connectors unique names.

Instead of topic-after-cooked/topic-after-cooked.hbs try topic-after-cooked/something-youre-trying-todo.hbs


(Mittineague) #3

Thanks, I originally had all the hbs files named “test” and I didn’t feel good about that so I renamed them.
And I was wondering if having the hbs file name being the same as it’s parent folder might cause problems, but as it didn’t seem to be causing any problems I was lazy and forgot about improving that.

I definitely like the “intent” naming idea and will do so for all of them, problem or otherwise, ASAP

I did change the hbs file name, which is reflected in the div class, but unfortunately it’s still breaking the Solved plugins use of that outlet so that it’s only an empty comment

<div class="ember-view" id="ember1662">
  <div class="ember-view topic-after-cooked-outlet show-topic-after-cooked-location" id="ember1667">
    <span class="in-post">
      <i class="fa fa-plug"></i>
  Topic After Cooked plugin outlet location is here
    </span>
  </div>
  <div class="ember-view topic-after-cooked-outlet solved-panel" id="ember1672">
    <!---->
  </div>
</div>

(Mittineague) #4

Seems odd to me.

With either one or the other (locations - Solved - but not both) installed they work and the only Warning in the Console is
SyntaxError: unreachable code after return statement vendor.js:19437:6

But when both are installed this additional Warning shows up

"DEPRECATION: You attempted to access `topic` from `<Discourse.TopicController:ember1109>`, but object proxying is deprecated. Please use `model.topic` instead. See http://emberjs.com/guides/deprecations/#toc_objectcontroller for more details.
    get@ember.custom.debug:15676:1
    .valueFn@ember.custom.debug:37781:16
    Stream.prototype.value@ember.custom.debug:16744:29
    read@ember.custom.debug:16984:14
    .valueFn@ember.custom.debug:16650:14
    Stream.prototype.value@ember.custom.debug:16744:29
    read@ember.custom.debug:16984:14
    .valueFn@ember.custom.debug:37766:21
    Stream.prototype.value@ember.custom.debug:16744:29
    read@ember.custom.debug:16984:14
    ShouldDisplayStream.prototype.valueFn@ember.custom.debug:37877:24
    Stream.prototype.value@ember.custom.debug:16744:29
    exports.default<.render@ember.custom.debug:39169:20
    EmberRenderer_createElement@ember.custom.debug:38948:9
    Renderer_renderTree@ember.custom.debug:8483:17
    scheduledRenderTree@ember.custom.debug:8560:9
    Queue.prototype.invoke@ember.custom.debug:872:11
    Queue.prototype.flush@ember.custom.debug:937:13
    DeferredActionQueues.prototype.flush@ember.custom.debug:742:13
    Backburner.prototype.end@ember.custom.debug:167:11
    Backburner.prototype.run@ember.custom.debug:222:15
    Backburner.prototype.join@ember.custom.debug:241:18
    run.join@ember.custom.debug:16014:12
    run.bind/<@ember.custom.debug:16069:14
    jQuery.Callbacks/fire@jquery.debug:3095:10
    jQuery.Callbacks/self.fireWith@jquery.debug:3207:7
    .ready@jquery.debug:3413:1
    completed@jquery.debug:3429:2" ember.custom.debug:5258:5

And it is only a Warning, not an error.