Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

disqus_identifier set wrong #236

Closed
willrjmarshall opened this issue Oct 21, 2011 · 6 comments
Closed

disqus_identifier set wrong #236

willrjmarshall opened this issue Oct 21, 2011 · 6 comments

Comments

@willrjmarshall
Copy link

Hi,

So, when you're using a page of the format say ... my-page/index.html (after migrating from wordpress), so the url is /my-page.

disqus_identifier will incorrectly be set to /my-page/index.html, instead of /my-page.

This breaks migration from Wordpress/Disqus sites.

@fhemberger
Copy link
Contributor

Can you please try this: In source/_includes/_disqus.html replace

    var disqus_identifier = '{{ site.url }}{{ page.url }}';
    var disqus_url = '{{ site.url }}{{ page.url }}';

with

    var disqus_identifier = '{{ canonical }}';
    var disqus_url = '{{ canonical }}';

@willrjmarshall
Copy link
Author

That seems to do the trick. Working example with this patch is here: http://willmarshall.me/dj-template

@fhemberger
Copy link
Contributor

Great. I'll also add a patch so the canonical URL doesn't contain the unnecessary tailing slash any more.

@willrjmarshall
Copy link
Author

Excellent! This might break WP transfers as well: depends on how flexible Disqus is with exact URL matching.... but it's cleaner and easy enough to migrate via CSV.

@escobera
Copy link

The strip_slashes thing is causing problems on urls that had already created threads on Disqus. The identifier changes, so it creates a new thread.

@fhemberger
Copy link
Contributor

@willrjmarshall, @escobera

Please note the following change (commit 262eb52):
https://github.com/imathis/octopress/wiki/Disqus-identifier-issues

Sorry for the inconvenience.

briansimmons pushed a commit to briansimmons/octopress that referenced this issue Aug 20, 2013
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants