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?
Comment | File | Size | Author |
---|---|---|---|
#1 | disqus-workbench_moderation-1932870-1.patch | 636 bytes | gabriel.achille |
Comments
Comment #1
gabriel.achille CreditAttribution: gabriel.achille commentedsame 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.Comment #2
awolfey CreditAttribution: awolfey commentedThe 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.
Comment #3
DamienMcKennaThis 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.
Comment #5
DamienMcKennaCommitted. 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.