I have a little bit special requirements. For me, often it makes no sence to create a revision for a minor change like deleting returns or something like that. So I do not want to force the editor to create a revision in any case. I want to give him the power to choose wheter to create a revision or not. But if he creates a revision I want him to force to insert a log message.

Is it possible to insert that feature?

Comments

mdupont’s picture

Status: Active » Closed (won't fix)

This is a special case that will better fit in a custom module. It should be easy to do: to avoid giving users the "administer nodes" permission to allow them to choose the revision status, implement a new permission like "switch revision status", do a form_alter to link allow users with this permission to (un)check the revision checkbox , and it should work.

Enforce_revlog module has an AJAX event triggered when the revision checkbox is (un)checked and will adapt automatically. So if it's enabled for the content type and that the revision checkbox is checked, a revision message will be mandatory. If the user unchecks the revision checkbox, a message will no longer be required.

majorbenks’s picture

Status: Closed (won't fix) » Active

So if it's enabled for the content type and that the revision checkbox is checked, a revision message will be mandatory. If the user unchecks the revision checkbox, a message will no longer be required.

This is exactly what I need. But Enforce_revlog does not work like that. If I uncheck the revision checkbox, Enforced_revision does still enforce a log message. (The checkbox is not enforced, only the log message is enforced.)

So is my problem actually a bug report?

mdupont’s picture

Category: feature » bug

I'll have a look.

mdupont’s picture

Title: Does not have to create a revision but every revision must have a log message » Revision message still enforced event if revision checkbox is unchecked.
Version: 7.x-1.0-beta3 » 7.x-1.x-dev
Assigned: Unassigned » mdupont
Status: Active » Fixed

Fix committed in 7.x-1.x, will be in the -dev snapshot in a few hours. Thanks for the report!

While the AJAX callback triggered when clicking on the revision checkbox was indeed making the revision message appear as not required, the change wasn't really taken into account in the form underlying structure, and was still using the default value. I now try to use the value provided in $form_state (the one that changes during the AJAX callback) before using the default value.

mdupont’s picture

Title: Revision message still enforced event if revision checkbox is unchecked. » Revision message still enforced even if revision checkbox is unchecked.

Fixing typo in title.

majorbenks’s picture

Version: 7.x-1.x-dev » 7.x-1.0-rc1
Status: Fixed » Closed (fixed)

I tested this with rc1, it works fine now. Thanks.