The attached patch removes all instances of uses of hook_submit() attached for settings forms. The weights form is unaffected. Variable names remain same. Tested and revised but still needs review.

Comments

Gurpartap Singh’s picture

StatusFileSize
new12.23 KB

Removed a little debug code which was used to test if taxonomy module exists..

Gurpartap Singh’s picture

StatusFileSize
new12.23 KB

Opps attached the same one above. This is correct one, hopefully...

stella’s picture

Assigned: Gurpartap Singh » stella
Status: Needs review » Fixed

added to CVS

Anonymous’s picture

Status: Fixed » Closed (fixed)
stella’s picture

Released in faq-5.x-2.3.

Cheers,
Stella

nancydru’s picture

Hmm. It's my understanding that the "proper" way to handle a form is to use hook_validate to check the input and then hook_submit to actually store the data. That way you don't end up saving the values until everything passes validation.

stella’s picture

That's true in cases where you want to validate the data entered and where at least part of the data entered is not a system variable setting. For configuration forms that only contain system variables which are to be set in the "variable" table, you can use the system_settings_form() function.