Download & Extend

Some form elements are not available to rules_forms

Project:Rules
Version:6.x-1.x-dev
Component:Forms Support
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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.

Comments

#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

Status:active» needs review

Patch: this one adds an installation file and sets the module weight to 20 (same weight rules.module is set to).

AttachmentSizeStatusTest resultOperations
rules-557892.patch653 bytesIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch rules-557892.patch.View details

#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

Status:needs review» reviewed & tested by the community

looks fine

#5

Status:reviewed & tested by the community» fixed

and committed.

#6

Status:fixed» needs work

Have you also added an _update() for existing installations? Else they won't ever get the new weight.

#7

Status:needs work» closed (fixed)

If not, it doesn't matter any more ;)

#8

Status:closed (fixed)» needs work

Umm I think the _update() still needs fixing, or am I missing something here???

#9

subscribing

#10

Status:needs work» needs review

Here's a patch which provides an update routine to set the weight to 20.

AttachmentSizeStatusTest resultOperations
rules_forms_weight.patch473 bytesIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch rules_forms_weight.patch.View details

#11

Status:needs review» needs work

The last submitted patch, rules_forms_weight.patch, failed testing.

#12

Status:needs work» needs review

Ah, looks like patch maybe needs to be run from the root folder of the rules project?

AttachmentSizeStatusTest resultOperations
rules_forms_weight.patch485 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 13 pass(es).View details

#13

Status:needs review» fixed

Committed to CVS, thanks.

#14

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

#15

Thanks klausi!

nobody click here