I have the latest versions of revisioning and module grants installed. I also have workflow installed and the access control module for workflow running. And now, I have discovered that I cannot unpublish nodes. If I go into a node to unpublish, I get the message that the node has been published and instead of showing me a node view, they show me the revision menu that you get when you want to view/edit/revert to a revision. I uninstalled the module, or rather de-activated it to see if it was the revision module causing the issue but, even with the module uninstalled, I still see the revision tab and menus!
I am really confused and in need of help. I posted on workflow's page about this too because I can't tell what module is causing what issue.
Becky
Comment | File | Size | Author |
---|---|---|---|
#26 | revisioning-allow_node_unpublish-751092-26.patch | 789 bytes | Chris Burge |
Comments
Comment #1
RdeBoerI suggest we get our brains around #751114: I can't get revisioning uninstalled first, before returning to this issue.
There are at least a couple of ways to "unpublish", depending on permissions. What role are you in when you do the above? What link on what page do you use to unpublish? Are you using the "Published" tick-box on the Edit page (requires "administer nodes"), perhaps?
Comment #2
beckyjohnson CreditAttribution: beckyjohnson commentedOk. First of all, if I go to the revisioning tab when it is installed, I can click on the tab that says unpublish and it will. However, I get a white blank page after I click on the tab. It does unpublish though. But, if I go to the node and just uncheck the publish check box and save, the node remains saved. I kind of wonder what is going on. I am using this module with workflow and it was in the state it needs to be in, in order to be published.....would that effect things?
Comment #3
RdeBoerSorry Becky -- can't reproduce, especially not the white page.
So you must be logged in as admin...
What do you get when you first click the "Revisions" tab and then click the link "Unpublish current revision" (as opposed to "Unpublish this" tab on the following page)?
Have you created any Actions or Rules that are triggered upon saving?
Comment #4
NaX CreditAttribution: NaX commentedI have this same problem. I am only able to unpublish content by going to "Unpublish this" tab when viewing a revision, but when I un-check the publish checkbox or when I use the update options action under admin/content/node or when I use a unpublish action through views bulk operations I always get a message Auto-publishing this revision.
This means I am only able to unpublish content manually one item at a time by using the Unpublish this tab eliminating all bulk management operation.
Comment #5
RdeBoerThanks for the report.
Looks like you're experiencing two types of interference
1) when you're logged in as someone with the 'administer nodes' permission (e.g uid=1) and uncheck the 'Publish' box
2) when using VBO
I will investigate as soon as I have some time.
Note that the symptoms should go away if you're willing to sacrifice the auto-pubslish feature, i.e. untick the box Auto-publish drafts of type <type > (for moderators).
Comment #6
NaX CreditAttribution: NaX commented@RdeBoer
Thanks for looking into this.
I don't fully understand how Drupal's revision system works and how Revisioning interacts with Drupals' revisions.
What do you think will happen if we remove the
$node->status = TRUE;
from the presave auto publish code.As far as I can tell it will still make the new revision the current item but will retain the nodes status set by the user/action/rule.
If this is the case then this would work for my needs. I need Auto-Publishing of the latest revision but I also need the node status/publish settings to be retained. I hope that makes sense. I have not tested this yet.
EG:
If I am correct in my assumption, we could add a second setting to the Auto-Publish settings, something like "Force node publish status". In this way we break up the two concepts.
I hope all that makes sense.
Comment #7
mahesh e p CreditAttribution: mahesh e p commented@NaX
Thanks. #6 workaround worked and best solution for me
Comment #8
avibrazil@gmail.com CreditAttribution: avibrazil@gmail.com commentedI am having this conflict.
I would be satisfied if Revisioning module could simply make a VBO action appear on its pull down menu saying 'unpublish this revision'.
Or just paste here the PHP code that calls Revisioning API we could use in the VBO 'execute PHP code' action.
Thanks in advance
Comment #9
CatherineOmega CreditAttribution: CatherineOmega commentedI only use Revisioning on a single site, but it seems to prohibit administrators from EVER unpublishing a published node; as long as "Auto-publish drafts of type news_post (for moderators)" is checked in a CCK type's Workflow settings, any change to the node is detected as a revision...which gets automatically published.
...which is inconvenient when you have a site that needs Revisioning and your content type is called "news_post", you know? :)
Comment #10
Mac Clemmens CreditAttribution: Mac Clemmens commentedMy suggestion is to unset "revision_moderation" on node form submission when "status" = 0.
When the user does not want to publish a node, it should not create a draft to be auto-approved by an administrator.
I added this to a hook_form_alter function for any node form of the applicable content type:
And then,
And it stopped trying to publish the nodes we were unchecking the "Published" checkbox on.
Comment #11
decafdennis CreditAttribution: decafdennis commentedChanging this to a bug report.
Might I suggest another workaround:
Note that this workaround only works if the module in which this is implemented has a lower weight than the revisioning module.
Comment #12
RdeBoerChecked into Git (6.x-3.x branch) a solution based on naquah's (#11) -- with creditation, see http://drupal.org/node/407994/committers.
Comment #14
olmyr CreditAttribution: olmyr commentedwhen you create a new node and press unpublish. However, the node is still published.
Here my simple fix:
Comment #15
RdeBoer@mirgorod_a, #14:
Agree with the symptoms you found. However, I don't think your solutions is quite right, as $was_published will be empty for ANY new node, regardless of the how the Publish box was ticked (this is because for a new node $node->nid is empty).
Basically, for a new node the only way to tell whether the box was ticked by default and then unticked on the edit form is by finding out what the default is for the content type. So I checked in this code:
Comment #16
RdeBoerChanging status to fixed (again).
Comment #18
TechNikh CreditAttribution: TechNikh commentedsame issue with Drupal 7.
when I unpublish, selected content in admin/content section, It says "Auto-publishing this revision."
Comment #19
RdeBoerComment #20
HairMachine CreditAttribution: HairMachine commentedWe're also seeing this issue on a site with the 7.x-1.5 version of Revisioning - if you navigate to the admin/content page and select a few nodes to be unpublished, they are immediately re-published with the message 'Auto-publishing this revision'.
Might try adapting one of these workarounds for D7, shouldn't be too difficult... (famous last words)
Comment #21
TechNikh CreditAttribution: TechNikh commentedmarking it active as per #20
Comment #22
HairMachine CreditAttribution: HairMachine commentedIndeed it was easy! If anyone else is seeing this behaviour in Drupal 7, this adaption of #11 seemed to do the trick.
Comment #23
RdeBoerThanks HairMachine!
Rik
Comment #24
jackalope CreditAttribution: jackalope commentedI can confirm that the code published in #22 does the trick for this problem in Drupal 7; that said, can this somehow be fixed within the D7 version of the Revisioning module itself?
Comment #25
jastraat CreditAttribution: jastraat at Technivant commentedSince the original node is already present, you don't need to do a db_query. Suggested edit:
Comment #26
Chris Burge CreditAttribution: Chris Burge commentedThis is a bug in the Revisioning module and shouldn't require a custom module and hook_node_presave() to correct. Attached is patch that implements #25 in revisioning_node_presave().
Comment #27
filsterjisah CreditAttribution: filsterjisah for District09 commentedTested, works great!
Comment #28
jannis CreditAttribution: jannis commentedRTBC + 1
can we get this committed?
Comment #29
RdeBoerCommitted #26.
Thank you jastraat and Chris Burge