When accessing /users there is an error displayed:
Warning : include(/.../htdocs/mywebsite/sites/all/themes/a_base_theme/templates/profiles/commerce_kickstart/modules/commerce_kickstart/commerce_kickstart_user/user-profile-category.tpl.php) [function.include]: failed to open stream: No such file or directory dans theme_render_template() (ligne 1495 dans /.../htdocs/mywebsite/includes/theme.inc).
This error doesn't appear when using the base themes but only with a custom theme. It turns out that the only difference was that my theme had a "user-profile-category.tpl.php" file in the templates directory.
The second step was to find what was different between the two cases. For that I added a dpm($theme_registry['user_profile_category']); at the end of commerce_kickstart_user_theme_registry_alter(). Here is some part of the result:
Working:
template => profiles/commerce_kickstart/modules/commerce_kickstart/commerce_kickstart_user/user-profile-category
theme path => modules/user
Broken:
template => profiles/commerce_kickstart/modules/commerce_kickstart/commerce_kickstart_user/user-profile-category
theme path => sites/all/themes/a_base_theme
path => sites/all/themes/a_base_theme/templates
So the working case did not have the "path" defined and the "theme_path" was different.
Patch following.
Comment | File | Size | Author |
---|---|---|---|
#2 | wrong_template-1790258-2.patch | 1.37 KB | idflood |
#1 | wrong_template-1790258-1.patch | 1.37 KB | idflood |
Comments
Comment #1
idflood CreditAttribution: idflood commentedHere is a first patch. I believe there must be a better way of fixing this but the hook_theme_registry_alter is a little obscure...
So with this:
- If no theme override the template then the templates from commerce_kickstart_user are used
- If a theme override the template then they are used
Comment #2
idflood CreditAttribution: idflood commentedOops, should check with strict equality to be more bullet proof.
Comment #3
ruplI didn't even have a template overridden in my theme and I encountered this error using Commerce Kickstart 7.x-2.0-rc1
Patch in #2 cleared the error and restored the "Account information" page.
Comment #4
alexp999 CreditAttribution: alexp999 commentedConfirmed this is working on RC4.
It would be good to get this committed before the next release.
Comment #5
bojanz CreditAttribution: bojanz commentedCommitted.