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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

idflood’s picture

Status: Active » Needs review
FileSize
1.37 KB

Here 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

idflood’s picture

Oops, should check with strict equality to be more bullet proof.

rupl’s picture

Status: Needs review » Reviewed & tested by the community

I 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.

alexp999’s picture

Confirmed this is working on RC4.

It would be good to get this committed before the next release.

bojanz’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

Status: Fixed » Closed (fixed)

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