Closed (fixed)
Project:
Rules
Version:
6.x-1.4
Component:
Forms Support
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 Aug 2009 at 12:19 UTC
Updated:
25 Apr 2012 at 19:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
klausiSetting the module weight could be done easily in an install file ... the question is: what would be a good and sane value? We want to be the last called hook_form_alter(), so what should we set the weight to? 1, 10, 100 or 1000? Suggestions?
Comment #2
klausiPatch: this one adds an installation file and sets the module weight to 20 (same weight rules.module is set to).
Comment #3
gpk commentedSeems reasonable. On a site I have with 70 active modules there are a few with weight 1, then CCK fieldgroup with weight 9, Views and Token with weight 10, Rules with weight 20 and Devel with weight 88.
Thanks!
Comment #4
nodestroy commentedlooks fine
Comment #5
klausiand committed.
Comment #6
fagoHave you also added an _update() for existing installations? Else they won't ever get the new weight.
Comment #7
fagoIf not, it doesn't matter any more ;)
Comment #8
gpk commentedUmm I think the _update() still needs fixing, or am I missing something here???
Comment #9
YK85 commentedsubscribing
Comment #10
gpk commentedHere's a patch which provides an update routine to set the weight to 20.
Comment #12
gpk commentedAh, looks like patch maybe needs to be run from the root folder of the rules project?
Comment #13
klausiCommitted to CVS, thanks.
Comment #15
gpk commentedThanks klausi!
Comment #16
manObject commentedI have discovered an anomaly in version 6.x-1.4 that was not present in previous versions. This is that an empty CCK text field entity (such as a signature field's text entity) no longer equates to FALSE for user content. It is as if the form element's enclosing HTML is included in the has-content test, instead of just the value of the text entity it contains. Therefore the Rules test "Does the field contain text?" always equates to TRUE, even if there is no content text whatsoever in the entity. This is regardless of whether the Rule is constructed around "Content is to be saved" or "After saving new content" or "After existing content has been updated". Especially where the test is being carried out on a submitted form's variables, why should enclosing HTML be involved?
Is there some way of getting Rules/CCK to look within such form elements to the actual variable that is passed on form submission?
The patch (posted by gpk) to increase the weight of the 'rules_forms' field in the 'system' table of the database to 20 had already been applied and did not fix the problem.