Hi,
After enabling pathauto on an advanced project, I realised that the usual checkbox in the "path" tab was missing and that aliases were not generated.
Digging a lot, I found that core function path_form_node_form_alter
was called after pathauto_field_attach_form
what caused the if (!isset($form['path']))
condition to fail.
I have been using pathauto for a lot of projects without any problem but I cannot figure why this is hapenning. I looked at the modules' weights in the system table and I found the issue here.
For an unknown reason, all my core modules had been weighted to 15 so they were called before and causing the issue.
Here is a patch to avoid this.
Best regards.
Comment | File | Size | Author |
---|---|---|---|
pathauto-better-weight-on-install.patch | 723 bytes | DuaelFr | |
Comments
Comment #1
Dave ReidThis is very very very strange and the larger issue here is why your core modules had their weights changed.
Comment #2
DuaelFrYes it is, but this trick I put in the patch is used by a large number of modules which can be exposed to the same kind of issues (not with core modules in general), so I think it is safe.
Out of subject : the more surprising thing is that on my staging server, deployed with drush and features, all the core modules have a weight of 5... not 15...
Comment #3
Dave ReidI'm still not sure we can support this. Path module is always assumed to have a weight of 0 by core.
Comment #4
DuaelFrI found that one of my contrib modules was buggy and was changing the core modules' weight upon installation. So this patch is no longer needed. Thanks for your time Dave.
Comment #5
Dave ReidOoooh, which module was it? I need to shame them.
Comment #6
DuaelFrNobody's perfect. I don't remeber which one it was but I think I found a patch in the issue queue that has been commited later.