Rule defined by framaforms have side effects
Concern
The following rules defined by framaforms
can have undesired effects :
- form1_is_to_republish (republish expired forms whose expiration date was pushed back by user)
- form1_is_unpublished (redirect to "expiration" page when a user accesses its own expired form)
The main reason is that these rules are based on the assumption that a form is unpublished
is equivalent to a form is expired
, which is only true for a simple usage of the software.
For example, using framaforms_spam
module also introduces form publishing/unpublishing based on other conditions (if the form contains suspicious words, etc). Rules from framaforms
supposed to only apply to expired forms can have effects on forms in quarantine, as both are concerned by the condition "node is unpublished".
Possible solution
Based on the framaforms_expiration
table defined in framaforms.install
, create the following check functions :
-
framaforms_node_is_expired
(checks if the node is inframaforms_expired
) -
framaforms_expiration_date_was_pushed_back
(checks if the user pushed back the expired form's expiration date based on the datedate_notified
field of theframaforms_expired
table).
Publication status should be affected by Rules, but it shouldn't be a selection criteria in this case (too large).