I have problem with the combination of Disqus and Workbench moderation (used for workflow, to set posts to "draft", "needs review", "publish" etc.)

When I have a content type with workbench moderation enabled, I can't uncheck "Disqus comments".
If I uncheck it and save the node, the comments are still there. And if I edit the node again the checkbox is still checked. So it seems that it fails to save.

If I do the same with another content type, where Workbench moderation isn't enabled, it does work as it should.

I'm really not shure where the problem lies, in Disqus module, or the Workbench moderation module.
Any idea?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gabriel.achille’s picture

Status: Active » Needs review
FileSize
636 bytes

same thing here.
i think that disqus does not respect the practices of node API, in certain situation (like when using workbench_moderation) it results in loosing its settings.
AFAIK, workbench_moderation is doing an extra node_load and node_save in the background, without going trough the node_form API. And disqus loads the "Disqus comments" property of the node into $node->disqus['status'] in hook_node_load and retrieve the value from $node->disqus_status during hook_node_save.
I fixed that by setting $node->disqus_status too during hook_node_load.

awolfey’s picture

The patch works for me in a limited way.

There is a second part of the issue which is that disqus does not save revision info for the disqus_status property. The result is that even with the patch, with workbench moderation on, any changes made to the disqus_status always apply to the published revision and not to drafts.

I don't really think it's too important, but it might make sense for the module to provide a field through the field api rather than the form api so that revisions are created.

DamienMcKenna’s picture

Issue summary: View changes

This is being used by at least one client project.

I agree with awolfey, but that would require a rewrite of that part of the module. if someone wants to put together a patch with the necessary changes we'll review it.

DamienMcKenna’s picture

Status: Needs review » Fixed
Parent issue: » #3240476: Plan for Disqus 7.x-1.13-beta1

Committed. Thank you!

Any architectural changes will have to go into a new issue, and a new branch, and are unlikely to happen at this point.

Status: Fixed » Closed (fixed)

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