Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
it would be great to show a confirmation overlay similar to edit or delete nodes to prevent publish or unpublish nodes by mistake.
regards
Comment | File | Size | Author |
---|---|---|---|
#27 | publishcontent-1399572-27.patch | 4.04 KB | johnennew |
#25 | publishcontent-confirm-1399572-25.patch | 4.31 KB | johnennew |
#22 | Confirm_Form_Permission_Based-1399572-22.patch | 4.15 KB | julou |
#13 | Confirm_Form_Permission_Based-1399572-13.patch | 4.11 KB | aadityawalawalkar |
#9 | ConfirmForm-1399572-9.patch | 2.94 KB | aadityawalawalkar |
Comments
Comment #1
AaronBaumanThe only use case that I could imagine for this behavior is a user who has "unpublish" permissions, but doesn't have permission to view the unpublished content.
In that case, accidentally clicking "unpublish" would bar the user from seeing the content until another user could re-publish.
However, adding a large block of logic and cluttering the workflow for what is essentially an edge case is not something I'm interested in working on.
IMO the point of this module is to have a simple one-click way to publish/unpublish.
I am strongly opposed to injecting a confirm page into the default behavior, but it could work as a config option or under certain specific conditions.
Comment #2
AaronBaumanComment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedon my site a user should be able to keep his content private so noone else would be able to see users content besides this content he has published by himself. other users shouldn't be able to publish or unpublish content that isn't their own.
on a users profile there should be 2 views that shows fields from content and the appropriate edit, delete and publish/unpublish links...one for all published nodes and the other for unpublished nodes and maybe friends from the user (using user relationship) or all authenticated users should be able to see the published content.
so if a user publishes his confidental content by mistake maybe he wouldn't realized it. to prevent that an overlay message would be very useful.
Comment #4
esbite CreditAttribution: esbite commentedIn my opinion an action that alters data such as Publish/Unpublish should always use a confirmation dialogue that does POST and nonce-validation, as Drupal's Form API does.
Search engines visiting an unpublish url are probably not a valid concern here since login is required, but imagine a browser that automatically fetches pages you might go to next. Chrome already has this feature enabled by default.
http://support.google.com/chrome/bin/answer.py?hl=en&hlrm=en-GB&answer=1...
Comment #5
AaronBaumanSince Publish Content doesn't have any configuration besides permissions, I think a "skip publish confirmation" and "skip unpublish confirmation" might be a good approach to offer this functionality. I'm happy to consider a patch, but I've no time or interest to write it.
Comment #6
rogical CreditAttribution: rogical commented+1 this function is very common very useful
Comment #7
Rob_Feature CreditAttribution: Rob_Feature commentedYeah, just voting that this is really needed. It's way too easy for a more novice user to unpublish content and not even really realize what they did.
Comment #8
LiloLilo CreditAttribution: LiloLilo commented+1 I'd like to see a confirmation form similar to the delete one. One-click actions may drive to undesired results. As a user I would expect to see a confirmation form to submit or cancel.
Comment #9
aadityawalawalkar CreditAttribution: aadityawalawalkar commentedPlease find the patch which attaches a confirmation form to Publish and Unpublish tab.
Comment #10
aadityawalawalkar CreditAttribution: aadityawalawalkar commentedComment #11
Simon Georges CreditAttribution: Simon Georges commentedWould you be willing to add the "bypass confirmation" permission, as suggested in #5 by aaronbauman?
Comment #12
LiloLilo CreditAttribution: LiloLilo commented#9 worked for me, many thanks!
Comment #13
aadityawalawalkar CreditAttribution: aadityawalawalkar commentedPlease find the patch which attaches a confirmation form to Publish and Unpublish tab based on "skip publish confirmation" and "skip unpublish confirmation" permission(s).
Comment #14
Simon Georges CreditAttribution: Simon Georges commentedThanks!
Comment #15
Simon Georges CreditAttribution: Simon Georges commentedTestbot ?
Comment #17
Simon Georges CreditAttribution: Simon Georges commentedNeeds a re-roll, then.
Comment #18
NWOM CreditAttribution: NWOM commentedI manually patched the module using the above patch and it works perfectly. Thanks a lot!
Comment #19
johnennew CreditAttribution: johnennew commentedThe tests will need updating to accommodate this change.
Comment #20
Anonymous (not verified) CreditAttribution: Anonymous commentedPatch #13 works for me, but after the confirmation, I get "You are not authorized to access this page". I don't get that as root admin, but all other user-role ends up with this, even though I have given permission for other roles to see unpublished content.
Comment #21
NWOM CreditAttribution: NWOM commentedThe patch still works, but needs to be manually patched since a re-roll is needed.
Comment #22
julou CreditAttribution: julou commentedThis patch is very helpful, thanks!
Please find a patch against the dev version attached.
PS: testing fails, I'm sorry I don't know how to handle this (at least the patch is up-to-date with the dev version)
Comment #24
sanjarhakimi CreditAttribution: sanjarhakimi commentedWhere can I edit the button label from "Unpublish" to something like "Confirm" ?
Comment #25
johnennew CreditAttribution: johnennew commentedPatch which fixed tests added. I think I like @sandshakimi suggestion of using Confirm on the form rather than Publish / Unpublish.
Comment #26
johnennew CreditAttribution: johnennew commentedSetting to needs review for testbot
Comment #27
johnennew CreditAttribution: johnennew at Deeson commentedThis patch fixes some coding standards issues and string translation issues. Also renames the button text to Confirm rather than the operation.
Comment #29
johnennew CreditAttribution: johnennew at Deeson commentedTests passed! Committed! Thanks all.
Comment #32
anneeasterling CreditAttribution: anneeasterling as a volunteer commentedUnfortunately, the "skip confirmation" didn't make it in the newest module version, 7.x-1.4. Would it be possible to get the "skip confirmation" permission added back in?
Until then, I'm rolling back to the previous version. The user experience for this new confirmation step is confusing to my editors.
Many thanks for your consideration!
Comment #33
chevali CreditAttribution: chevali commentedIs there a way to make this feature optional? we get dozens of content a day and the new update just makes it extra long to publish the nodes ( we need to review them as well, so bulk publish is out of the picture )
Comment #34
efpapado CreditAttribution: efpapado at Ramsalt Lab commentedProposing patch for extra permission that will allow to skip the confirmation step.
Comment #35
efpapado CreditAttribution: efpapado at Ramsalt Lab commentedMoving the discussion to a more proper issue https://www.drupal.org/node/2828633