Invoking other hooks from hook_boot() may cause inconsistent behavior on other modules. Pathauto is just an example of this #1574520: Dev version breaks Pathauto patterns admin page.

Also, it seems not to be a good practice, see #496170: module_implements() cache can be polluted by module_invoke_all() being called (in)directly prior to full bootstrap completion

So we need to fix this in variable_realm module, which uses hook_variable_realm_controller(). Other variable hooks may also cause issues, since hook_variable_info() is invoked from variable_get_value() and that function should be ideally bootstrap-safe.

We need to research options but basically the solution may be rewriting hook invocation for not to use module_invoke_all() nor module_implements().

Comments

jose reyero’s picture

First patch committed which:
- Uses _variable_realm_invoke_all(), which is a bootstrap-safe version of module_invoke_all.
- Removes hook_variable_realm_info_alter(), which also is not good during bootstrap

Pls’s picture

Can you please attach this patch so we can review and report you some feedback? Thanks!

rimen’s picture

Thanks! Patch work for me! (I had a problem with pathauto).

bforchhammer’s picture

Using current dev version, I still get an incomplete form on the pathauto pattern page... For me only the "default node pattern" is shown; all the other ones (node-type specific, user, taxonomy) are not displayed.

jose reyero’s picture

@bforchhammer,

Have you tried refreshing the cache? or disabling and enabling the module?

bforchhammer’s picture

Have you tried refreshing the cache? or disabling and enabling the module?

Yes, both.

bforchhammer’s picture

Alright, I've debugged this a bit more and found out that my pathauto page only breaks when I enable the domain_variable module. Looks like this needs a fix in domain_variable, so as far as variable is concerned this can probably be considered fixed.

New issue in domain_variable queue: #1686154: Module breaks pathauto pattern form.

jose reyero’s picture

Status: Active » Fixed

Ok

Status: Fixed » Closed (fixed)

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