Hello fellows and Gurus,

I am having a problem with a mobile theme of our standard website (running Drupal 7)

We therefore have two URLs:

  • mywebsite.com
  • m.mywebsite.com

We use the ThemeKey module to redirect to the correct theme/templates. We also tried Mobile Tools, but it does not work any better, so it is currently disabled.

For most pages, the url detection works and successfully redirects to the mobile theme when m.mywebsite.com/<somepage> is called.

However, when user wants to edit his own profile (m.mywebsite.com/user/<uid>/edit), the standard page is shown instead.

Same happens with the "cancel account page" (m.mywebsite.com/user/<uid>/cancel).

However the registration page (m.mywebsite.com/user/register), and the forgot your password page (m.mywebsite.com/user/password) works OK. Even when the user is connected for the latter.

Any ideas of what could be wrong in our configuration/code ?

  • What happens when you remove the extra forward slashes from the paths? e.g. m.mywebsite.com/user/edit
    – Clive
    Commented May 14, 2012 at 14:28
  • Thanks for your quick feedback ! Actually I tested this. It returns an "Access denied message". Same happens on the standard URL (mywebsite.com/user/edit), by the way. Actually instead of the double forward slashes, one should read mywebsite.com/user/[uid]/edit. I should have url-encoded my &lta; and &gta;
    – Cypher
    Commented May 14, 2012 at 14:33
  • Do you have a specific administration theme set in your Appearance settings? If you disable the admin theme, does it correct the issue?
    – sheena_d
    Commented May 14, 2012 at 14:34
  • It might have something to do with the fact a user edit page is normally handled by the admin theme...can you disable that for the time being to test?
    – Clive
    Commented May 14, 2012 at 14:35
  • @sheena_d Great minds eh? ;)
    – Clive
    Commented May 14, 2012 at 14:35

1 Answer 1


Here is the answer : http://drupal.org/node/1130158

To quote:

user/%/edit is an admin path. See function user_admin_paths for details.

So if you enabled an "Administration theme" at "/admin/appearance", this theme will be applied instead of any theme configured using ThemeKey.

Also: Don't forget to specify "system" in your settings for theme_key.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.