Note that there are some explanatory texts on larger screens.

plurals
  1. POintegrating disqus with emberjs only works on first page load
    primarykey
    data
    text
    <p>I am running ember-1.0.0-rc.5 and created a view for disqus comments which i'm passing the article ID. </p> <p><strong>My Problem is that disqus does not know when i switch from one page to another.</strong></p> <p>This is the view code:</p> <pre><code>App.DisqusView = Ember.View.extend({ tagName: 'div', elementId: 'disqus_thread', didInsertElement: function(){ var root_url = "http://my-root-url.herokuapp.com" var page_id = this.get('identifier'); /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */ var disqus_identifier = "item-" + page_id; console.log(disqus_identifier); / this outputs the correct id/ var disqus_title = "the song title" ; console.log(disqus_title); / this outputs the correct title/ var disqus_url = root_url + '/#/song/' + page_id; console.log(disqus_url); / this outputs the correct url for the page/ var disqus_shortname = 'example'; /* * * DON'T EDIT BELOW THIS LINE * * */ (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); } }); </code></pre> <p>and this is in my handlebar template:</p> <pre><code>{{view App.DisqusView identifierBinding="id"}} </code></pre> <p>So, the comments are rendering on all pages, but one comment persists to all pages, as though disqus thinks they're all the same page. </p> <p>I am logging the page_id and url to make sure that i'm giving disqus the correct url.</p> <p>also when I click from one page to another when both have disqus, the console spits out a bunch of disqus errors:</p> <pre><code>DISQUS assertion failed: Unsafe attempt to redefine existing module: stringify [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: parse [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: domready [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: on [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: once [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: off [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: trigger [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: stopListening [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: listenTo [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: listenToOnce [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: bind [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: unbind [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: getShortnameFromUrl [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: getForum [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: isSSL [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: guessThreadTitle [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: getContrastYIQ [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: colorToHex [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: getElementStyle [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: getAnchorColor [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: normalizeFontValue [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: isSerif [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: getBrowserSupport [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: getPermalink [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: expose [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: BaseApp [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: WindowedApp [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: ThreadBoundApp [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: PublicInterfaceMixin [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: Switches [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: Profile [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: BackplaneIntegration [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: Lounge [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: Ignition [VM] embed.js (16737):1 DISQUS assertion failed: Unsafe attempt to redefine existing module: HostConfig </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload