Every single page tries to load Disqus no matter what my settings are after the patch. It then fails to load and i get all these errors on the page. I've disabled, cleared cache, and re-enabled but its more of the same.

Notice: Undefined index: domain in theme_disqus_noscript() (line 815 of all/modules/contrib/disqus/disqus.module).
Notice: Undefined index: url in theme_disqus_noscript() (line 815 of all/modules/contrib/disqus/disqus.module).
Notice: Undefined index: domain in disqus_element_post_render() (line 117 of all/modules/contrib/disqus/disqus.module).
Notice: Undefined index: url in disqus_element_post_render() (line 118 of all/modules/contrib/disqus/disqus.module).
Notice: Undefined index: title in disqus_element_post_render() (line 119 of all/modules/contrib/disqus/disqus.module).
Notice: Undefined index: identifier in disqus_element_post_render() (line 120 of all/modules/contrib/disqus/disqus.module).

Comments

slashrsm’s picture

We fixed very similar thing in #2501743: Default Disqus status is always TRUE., which was already committed. Can you test 7.x-1.x-dev and report back?

yeaha’s picture

edit: no problems anymore with -dev version

stellarvisions’s picture

dev did not fix for us -- http://stellarvisions.com
drupal 7.38

isherwood’s picture

Same problem at http://blog.atomiclearning.com/highed with both stable and dev releases. The problem is intermittent, showing up maybe 25% of the time.

slashrsm’s picture

Please test (not in production!!) https://www.drupal.org/node/2508561#comment-10039259. Note that patch might need an update hook that is not there yet.

slashrsm’s picture

It would be great if you could report more details about your sites (how many nodes, how many of those had Disqus enable before upgrading to 7.x-1.11, ...).

hunterking’s picture

Neither the dev version nor the patch worked for me. Had Disqus working for probably 9 months or so, set to show on every new blog post. While the actual comment form doesn't load, the comments block (recent comments etc) does.

I'm disabling it for now but my site is www.stormsurgeofreverb.com

slashrsm’s picture

Version: 7.x-1.11 » 7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new1.81 KB

Please test if this patch fixes this problem.

warrenreario’s picture

Same errors with the 7.x-1.12 version

teek’s picture

I too have this problem, see here: https://myrpi.nl/node?page=1
There are no errors in the pages where Disqus is supposed to load it seems (in the blog posts/tutorials)
I'm using 7.x-1.12 and the most recent drupal 7.

slashrsm’s picture

Please test patch in #8 and report back if it fixes the issue or not.

vincer’s picture

Patch #8 cleaned the noscript and post_render issues.
But then I got:

Notice: Undefined index: status in disqus_node_view() (line 251 of ...sites/all/modules/disqus/disqus.module).

slashrsm’s picture

Media Crumb’s picture

Status: Needs review » Fixed

Dev worked fine for me

slashrsm’s picture

Status: Fixed » Needs review

We still have an uncommitted patch in this issue.

teek’s picture

I have the same issue, even with dev (drupal 7.38), see example: https://myrpi.nl/node?page=1
Is happens only on page 1, not on the first nor on the last page.
(Edit: this was supposed to be a reply to vincer)

teek’s picture

I've moved back to disqus-7.x-1.10 which removes the issue for me, the issue is present in disqus-7.x-1.11, disqus-7.x-1.12 and disqus-7.x-1.x-dev.

slashrsm’s picture

Can you please test patch in #8? That patch hasn't been committed yet.

vincer’s picture

I retested with a fresh 7.x-1.x-dev and patch node/2508561 #10.
It seems to be fine now. :)
I haven't added this patch, from this report.

teek’s picture

@slashrsm Sorry, I have no idea how to patch. Perhaps later in time I can be of more assistance.

CriticalBlast’s picture

Same here -- I'm not a patcher. Just waiting for the next (fixed) version of this to show up in my Configuration reports as available to upgrade, so I can re-gain my lost traffic that comes from Disqus conversations.

slashrsm’s picture

See https://www.drupal.org/patch/apply to learn how to apply patches. It is not safe to commit and release this change until I get proper feedback. Help from everybody key to everybody's success. It is how free software works.

Mark_L6n’s picture

I tried the patch from #8, after running the patch at https://www.drupal.org/node/2508561#comment-10060446.
However, I received an error message.
What I ran: patch -p1 --dry-run < 2505743_8.patch
Response:

patching file disqus.module
Hunk #2 FAILED at 241.
1 out of 2 hunks FAILED -- saving rejects to file disqus.module.rej

However, I am not able to find a file disqus.module.rej.

slashrsm’s picture

StatusFileSize
new1.82 KB

Rerolled #8.

Mark_L6n’s picture

OK, tried new patch—long story :/

I restarted with a local copy of the site that was still on disqus 7.x-1.10.

2508561_10.patch:

patch -p1 --dry-run < 2508561_10.patch
patching file disqus.admin.inc
Hunk #1 FAILED at 70.
1 out of 1 hunk FAILED -- saving rejects to file disqus.admin.inc.rej
patching file disqus.install
patching file disqus.module
Hunk #1 FAILED at 236.
Hunk #2 succeeded at 314 (offset -34 lines).
Hunk #3 succeeded at 355 (offset -34 lines).
Hunk #4 FAILED at 774.
Hunk #5 succeeded at 1030 with fuzz 2 (offset -72 lines).
2 out of 5 hunks FAILED -- saving rejects to file disqus.module.rej

2505743_24.patch:

patch -p1 --dry-run < 2505743_24.patch
patching file disqus.module
Hunk #1 succeeded at 181 (offset -24 lines).
Hunk #2 FAILED at 241.
1 out of 2 hunks FAILED -- saving rejects to file disqus.module.rej

So then I upgraded Disqus to version 7.x-1.12
2508561_10.patch and 2505743_24.patch upgraded without error messages.

Looking around my site, I get the error message, on pages that display Disqus:
Notice: Undefined index: status in disqus_node_view() (line 251 of /path/to/drupal/sites/all/modules/disqus/disqus.module).

Don't see other errors.

slashrsm’s picture

@Mark_L6n: Thank you for your review. This helps us a lot to get this patch committed asap. Patches should be tested with -dev version of the module unless stated otherwise. Can you try again using that version?

Mark_L6n’s picture

What steps do you recommend, starting at disqus 7.x-1.10?
drush @alias up disqus-7.x-1.x-dev ? (or should I update first to 7.x-1.12?)
Which patches? 2508561_10.patch and 2505743_24.patch, or just 2505743_24.patch ?

slashrsm’s picture

I'd say that you stay on 7.x-1.10 for now and wait for next release. I am planning to tag it as soon as we resolve this issue, #2438717: Default status per node is broken for existing nodes and #2508749: Programmatic status updates (almost) impossible. Any help with pushing them forward is appreciated.

CriticalBlast’s picture

Mark_L6n, I would stay at 7.1.10 until the newest release is out. I'm at 7.1.12, and it still has its own issues with displaying Disqus (i.e. that it doesn't).

gippy’s picture

This only occurs when saving an edit on node types which are NOT selected in the Visibility and Default Options tab of admin/config/services/disqus. The error does not appear when saving an edit on a node type for which Disqus is enabled.

7.x-1.x-dev with #8 patch return the following error four times:
Notice: Undefined index: title in disqus_node_update() (line 384 of /Users/mark/Sites/truthunity.local/core/sites/all/modules/contrib/disqus/disqus.module).
for 7.x-1.12 the error is:
Notice: Undefined index: title in disqus_node_update() (line 366 of /Users/mark/Sites/truthunity.local/core/sites/all/modules/contrib/disqus/disqus.module).

It appears that line 366 of the 7.x.-1.12 version does not bypass nodes that should not display Disqus.

I tried going back to 7.x-1.10. The same behavior happens, except that the error is:
Notice: Undefined property: stdClass::$disqus in disqus_node_update() (line 332 of /Users/mark/Sites/truthunity.local/core/sites/all/modules/contrib/disqus/disqus.module).

But the behavior changes with 7.x-1.x-dev with #24: viewing any node for which the node type is enabled will return:
Notice: Undefined index: status in disqus_node_view() (line 259 of /Users/mark/Sites/truthunity.local/core/sites/all/modules/contrib/disqus/disqus.module).
and viewing any node for which the node type is not enabled with not return any error.

PascalAnimateur’s picture

StatusFileSize
new569 bytes

Wrong variable name used in disqus_node_load when determining the default_disqus_status.

Here's a patch that works for me.

slashrsm’s picture

StatusFileSize
new1.99 KB
new929 bytes

#24 with this small tweak fixes problem on my sites.

amme’s picture

Can confirm patch in #32 works

amme’s picture

Status: Needs review » Reviewed & tested by the community

The last submitted patch, 24: 2505743_24.patch, failed testing.

The last submitted patch, 8: 2505743_8.patch, failed testing.

The last submitted patch, 31: disqus-fires_on_every_page-2505743-31.patch, failed testing.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 32: 2505743_32.patch, failed testing.

  • slashrsm committed edf0685 on 7.x-1.x
    Issue #2505743 by slashrsm, PascalAnimateur, Mark_L6n, amme: After patch...
slashrsm’s picture

Status: Needs work » Fixed

Commited to 7.x-1.x. Will stay in -dev for a while so people can test before we do the release.

Thanks to all who contributed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

manuel garcia’s picture

It seems like everyone updating the module to the latest version is going to get its comments disabled on all nodes unless:
1. You re-save the options form on /admin/config/services/disqus
2. You edit every node on the site and re-enable disqus comments (not a realistic options on most cases).

I have tested briefly on my local environment upgrading to the dev version of the module, seems to do the trick.

Any updates on this? Can we make a new release?

manuel garcia’s picture