confirm_unpublish
Confirm Unpublish adds a confirmation dialog when unpublishing nodes to prevent accidental content removal. Site administrators can optionally enable logging to the database log (watchdog) when a user accepts the confirmation prompt.
By default, the confirmation dialog is shown for all content types. However, administrators can selectively exclude specific content types from this behavior through the module’s configuration form.
Requirements
This module requires no modules outside of supported versions of Drupal core.
Installation
Install as you would normally install a contributed Drupal module. For further information, see Installing Drupal Modules.
Configuration
The configuration form is located at:
/admin/config/content/confirm-unpublishFrom here you can:
- Customize the confirmation message displayed when unpublishing a node.
- Enable or disable logging to the Recent Log Messages report.
- Exclude specific content types from the confirmation behavior.
When enabled, the confirmation dialog appears only for content types
not excluded in the configuration. All types are included by default.
If logging is enabled, a message is recorded in the database log
(/admin/reports/dblog) each time a user accepts the unpublish confirmation.
Troubleshooting & FAQ
Q: The dialog isn’t showing up for a content type.
A: Make sure the content type is not excluded in the module’s configuration settings.
Q: Does this module actually prevent unpublishing?
A: No. It adds a confirmation dialog to reduce mistakes, but users can still proceed to unpublish after confirming.
Q: What gets logged when logging is enabled?
A: The log includes the user name and node path for each confirmed unpublish event.