Some form elements are not available to rules_forms
gpk - August 24, 2009 - 12:19
| Project: | Rules |
| Version: | 6.x-1.x-dev |
| Component: | Forms Support |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Description
This is because the form elements are added to the form by modules which execute hook_form_alter() after rules_forms does. For example, the pathauto "automatic alias" checkbox and the OG access "public" checkbox. Both these modules have a weight of 1. Manually increasing the weight of rules_forms to 1 in the {system} table does the trick for these specific form elements.

#1
Setting 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?
#2
Patch: this one adds an installation file and sets the module weight to 20 (same weight rules.module is set to).
#3
Seems 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!
#4
looks fine
#5
and committed.
#6
Have you also added an _update() for existing installations? Else they won't ever get the new weight.