If the Path Redirect module is enabled during profile-based installation it gets called by Pathauto (assuming that's also enabled). The process ultimately calls _path_redirect_build_conditions() which requests the schema with drupal_get_schema(). Unfortunately the schema is not available during installation (#200931: Schema not available in hook_install/hook_enable) which means the function fails and the called Path Redirect functions generate rubbish SQL thus generating errors.
Phew.
The attached patch fixes the problem by checking to see if $schema is still empty after the drupal_get_schema() call, if it is it loads up path_redirect.install and gets the schema directly.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | 849222-pathredirect-schema-install.patch | 912 bytes | dave reid |
| #5 | 849222.patch | 744 bytes | ezra-g |
| missing-schema-during-install.patch | 502 bytes | adaddinsane |
Comments
Comment #1
dave reidCommitted an easier fix that just checks if MAINTENANCE_MODE is defined in path_redirect_init:
http://drupal.org/cvs?commit=403442
Comment #3
ezra-g commentedThe originally proposed patch here resolved the my issue described in #889630: Path_redirect errors after COD installation. Humbly, marking as RTBC.
Comment #5
ezra-g commentedRe-roll.
Comment #6
ezra-g commentedComment #7
gregglesI believe the patch committed in #1 did not fix the problem. On an install profile with path_redirect 6.x-1.0-beta7 (built August 10th, comment #1 and the commit happened on August 6th) I get the error. Applying Ezra's patch fixes the problem.
I ran into this while building hyperlocalnews profile.
If I could RTBC again I would :)
Comment #8
dave reidSide note, should we maybe fix where this is being called from as well?
Comment #9
gregglesI'm not sure how we could fix it where it's getting called. This seems like the most specific place to do some schema helper shenanigans.
Or do you mean that the schema isn't loaded during execution of a .profile and we should fix that?
Comment #10
dave reidGreg and Ezra, could I get either of you to test the following patch which uses the drupal_get_schema_unprocessed() and simplifies the previous patch?
Comment #11
ezra-g commentedYes, this resolves the problem when installing COD. Thanks!
Comment #12
dave reidGreat. Committed to CVS, and tagging an RC1 now.
http://drupal.org/cvs?commit=433032
Comment #13
ezra-g commentedHooray! Thanks!