Keyword

A URL is "stuck" on localhost

  • Carter Tweed
  • Carter Tweed's Avatar Topic Author
  • Offline
  • New Member
More
6 years 4 months ago #165883 by Carter Tweed
A URL is "stuck" on localhost was created by Carter Tweed
I've been talking to Disqus support about this and don't seem to be getting anywhere. I acknowledge that sometime during development, a comment was added to a page on the localhost version of a site, which stayed there when the site went live. All other articles have the production URL, but this one page, which happens to be the most important, has "stuck" with localhost. Disqus say I need to set certain variables, which I can't do via the plug in, so I asked them just to clear out this one their end so the next actual comment is set to production. But they say that's not the problem because I do always set the full URL in the code, so they say the two when fully qualified are different in their system.

I'm sure you guys recognise this pattern without me giving the URL, but if you need it It'll have to be via PM.

Thanks

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 4 months ago #165921 by Krikor Boghossian
Replied by Krikor Boghossian on topic A URL is "stuck" on localhost
Hello,

Can you send me a screenshot of the plugin's settings?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Carter Tweed
  • Carter Tweed's Avatar Topic Author
  • Offline
  • New Member
More
6 years 4 months ago #165956 by Carter Tweed
Replied by Carter Tweed on topic A URL is "stuck" on localhost
Hi, and thanks for your support.
How can I PM you with this please?

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 4 months ago #165960 by Krikor Boghossian
Replied by Krikor Boghossian on topic A URL is "stuck" on localhost
Hello Phil,

Unfortunately there isn't a PM functionality available.
You can use a service like imgur.com or jumpshare to share screenshots.
A link to the issue is also needed.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Carter Tweed
  • Carter Tweed's Avatar Topic Author
  • Offline
  • New Member
More
6 years 4 months ago #165963 by Carter Tweed
Replied by Carter Tweed on topic A URL is "stuck" on localhost
Understood. Ok, here we go:
jumpshare.com/v/GfClRIQzk7d22O3z4Ffy

Thanks.

Please Log in or Create an account to join the conversation.

  • Carter Tweed
  • Carter Tweed's Avatar Topic Author
  • Offline
  • New Member
More
6 years 3 months ago - 6 years 3 months ago #166015 by Carter Tweed
Replied by Carter Tweed on topic A URL is "stuck" on localhost
Hi Krikor,

It's Cater ;-)

I fixed this, so thought I'd share how and ask a question which came up. The good news is there was nothing wrong with the jw_disqus plugin and no changes were needed to it ;-)

I should have said from the start, the real problem was the comment count, which was my own code, not matching the actual one shown on the same page as the comments. I was right in the fact the url alone was being used as a key by disqus which was the root of the issue, but digging futher I found I wasn't using the "data-disqus-identifier" along with the #disqus_thread suffix in the link. This means the first url disqus sees gets the comments. It's best practice to always use data-disqus-identifier in these circumstances.

So once I realised I needed that, I needed to know how your plugin was using them - it turns out this is the method in jw_disqus.php:
$output->disqusIdentifier = substr(md5($disqusSubDomain), 0, 10).'_id'.$row->id;

Once I duplicated that in my link code, all the counts instantly became corrected.

So my question - is this a computation you guys used to guarantee unique identifiers or is it something disqus needs?

Here's the working code:
<?php 
	$plugin = JPluginHelper::getPlugin('content', "jw_disqus");
	$pluginParams = new JRegistry($plugin->params);

	$disqusSubDomain = trim($pluginParams->get('disqusSubDomain', ''));		

	$disqusid = substr(md5($disqusSubDomain), 0, 10).'_id'.$displayData['item']->id;
	echo "&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"icon-comments\"></span>&nbsp;<a href=\"".$built_url."/#disqus_thread\" data-disqus-identifier=\"".$disqusid."\">0 Comments</a>"; 
?>

Thanks.
Last edit: 6 years 3 months ago by Carter Tweed.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 3 months ago #166047 by Krikor Boghossian
Replied by Krikor Boghossian on topic A URL is "stuck" on localhost
Hello,

Actually it's both. Disqus needs unique identifiers and this is way this is ensured ( the md5() part).

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
5 years 10 months ago #167998 by Krikor Boghossian
Replied by Krikor Boghossian on topic A URL is "stuck" on localhost
Is this is a Magento path?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
5 years 10 months ago #168020 by Krikor Boghossian
Replied by Krikor Boghossian on topic A URL is "stuck" on localhost
Hello Athman,
Since this question is not related to Joomla! nor to our extensions I am afraid I cannot assist you.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum