Closed (fixed)
Project:
Variable
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 May 2012 at 10:06 UTC
Updated:
3 Jul 2012 at 12:27 UTC
Jump to comment: Most recent file
Comments
Comment #1
bforchhammer commentedThe problem was that realms were not be switched if the fourth path element was "variable"; I'm not sure why that's there...
Jose, is it acceptable to just remove that part of the if condition?
Comment #2
jose reyero commentedThe idea is that forms in 'variable module' pages should handle the realms themselves (before building the forms) so we shouldn't be using 'hacks' like switching the global variables for that.
Comment #3
jose reyero commentedAs a first step, merged variable_realm_admin module into variable_admin so the module is full aware of realms and we can skip realm hooks stepping into 'regular' variable_admin forms.
Comment #4
jose reyero commentedFinally, added some realm parameters for all these admin pages.
Comment #6
stborchertSorry to re-open but I think I stumbled upon the same problem using version 2.1 of Variable (and latest Commerce Email). Maybe its an issue of Commerce Email but changing a line in variable.module fixed this for me.
Commerce Email uses
'page arguments' => array('variable_group_form', 'commerce_email'),inhook_menuto "create" its settings page. I noticed that the realm switcher is not displayed on this form (admin/commerce/config/email) because the functionvariable_form_alter()does call the implementations ofhook_variable_settings_form_alter()only for forms having "system_settings_form_submit" as submit callback.variable_group_form()however is using "variable_settings_form_submit".Changing
variable_form_alter()to this helped (simply moved the foreach outside the if-clause):(attached patch is based on version 7.x-2.1)
Comment #7
bforchhammer commentedYour patch would cause variable to act on every drupal form; I don't think that's something we want to do...
Either way, this sounds like a different issue; can you open up a new one?
This is possibly also related to #1602098: Variable realm edit pages broken for multiple realms.