I've added and enabled 'me' alias module in my Drupal 5 installation. The configuration page has following two lines of text


But, When I point my browser to http://mysite/user/me or http://mysite/blog/me (Obviously, me is some user-id in my site) , I'm getting Access Denied Page. How to resolve this problem?

Help me, Thanks in advance.

R. Kaja Mohideen

#20 query.csv_.zip1.13 KBaviddv1
Members fund testing for the Drupal project. Drupal Association Learn more


ahoeben’s picture

Are you logged in? What is your user id?
Do you get the same error when you go directly to http://mysite/user/[your uid] or http://mysite/blog/[your uid] ?

ahoeben’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)
kajamohideen’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Never mind. I have un-installed 'me' alias and started using Pathauto.

Thanks for your reply.

R. Kaja Mohideen

mErilainen’s picture

Version: 5.x-1.0 » 6.x-1.3
Status: Closed (fixed) » Active

I have this same problem with "me" aliases. I enabled the module, and after that I cannot go to /user -path, because I get "access denied" error. Maybe my problem has something to do with the Panels module, because I'm using a alpha3 release of the module for Advanced Profile Kit and I get this error when I enable "me"-aliases:

warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/merilai2/public_html/drupal6/sites/dev.ee.tut.fi.~merilai2.drupal6.opintopiiri/modules/panels/panels_page/panels_page.menu.inc on line 216.

There are no install instructions, should I define some paths or should it work just like that?

cdale’s picture

Version: 6.x-1.3 » 5.x-1.0

Can you confirm that you are in fact using Drupal 5? As you set the version to 6.x-1.3. :) Is this the dev version? Or 5.x-1.0?

mErilainen’s picture

No, I am using 6.x-1.3. I didn't open a new issue, because this seemed like abandoned and the problem is quite the same.

cdale’s picture

Version: 5.x-1.0 » 6.x-1.3

I'm sorry. I totally misread this issue. Let me take a look and I'll report back here.

cdale’s picture

Status: Active » Closed (duplicate)

Actually, this seems like a duplicate of http://drupal.org/node/368252

Can you confirm if increasing the weight of the me module so that it is greater than panels resolves this issue after clearing your caches?

Also, have you run update.php? As I'm sure I put a hook to update the weight of the me module to work around this issue.

mErilainen’s picture

Yep, changing the module weight seems to work.

aviddv1’s picture

I'm getting the same error. I do not have panels installed. If anyone except the administrator goes to http://mysite/user/me/edit it redirects to http://mysite/user/0 and then says "Access Denied."
Any ideas?


cdale’s picture

I can't do anything without knowing what version of the module you are using.

aviddv1’s picture

I'm using version 2.4. I can confirm that if I replace 'me' in the url with the intended user id, it does work.

cdale’s picture

What strikes me as odd, is that you say it redirects to user/0. Are you an anonymous user when you attempt to do this? What other modules do you have installed?

There is an issue with some update hooks not running properly in update.php, you can run update.php and force the 'me' updates to run by selecting version 6130 I think it is, or you can update the weight of the me module manually in the database to be something quite heavy, like 999.

Please report back if doing so fixes this problem for you. I did attempt to make a release for this last night, but the release got borked, and I'm waiting for d.org infrastructure to fix it up.

aviddv1’s picture

thanks for getting back to me. i am a registered user. I have pathauto installed but that's the only thing I can think of as far as modules that affect the paths. Like I said, it does work for the site admin and any user can go to their edit page using 'user/uid/edit'.

i did increase the weight to 999.

very strange.

cdale’s picture

What options to you have selected on admin/settings/me page?

Also, did you rebuild the menu after resetting the weight?

aviddv1’s picture

The options are
"Me" Alias: me
Case Insensitive: unchecked
Rewrite: checked
Allow users: unchecked
Redirect: unchecked
Use me alias: On everything path except (no exceptions in the paths textarea)

Just to confirm. I've emptied cache. I've rebuilt menus. I've confirmed the weight is 999. The regular path user/user id/edit works.


cdale’s picture

hmm. The problem here is the redirection. I can't think or see any reason why user/me/edit would redirect to user/0. It is not something I've come across before, and sadly I can't replicate this, so I really can't help you much I'm afraid.

If you have me redirection off, and you have nothing in the redirect anonymous users box, then I don't think this is something that 'me' is doing, but most likely something from another module.

What other modules do you have installed? List them all, even if you think it won't matter, as more often than not, these kinds of things are caused by the least likely suspect. I'm not saying other modules might have this bug, it might just be that you have another module installed that simply can't work with 'me'.

aviddv1’s picture

Sorry for such a long list, but here are all of the enabled modules.


Colorpicker Widget 6.x-2.0-rc1 Adds a color picker widget.
Depends on: Colorpicker (enabled), Content (enabled), Text (enabled)

Content 6.x-2.2 Allows administrators to define new content types.
Required by: Colorpicker Widget (enabled), Content Copy (disabled), Content Permissions (enabled), Editablefields (enabled), Fieldgroup (disabled), FileField (enabled), ImageField (enabled), Link (enabled), Node Reference (enabled), Number (enabled), Option Widgets (enabled), Text (enabled), User Reference (disabled), View Reference (enabled), FileField Meta (disabled), Image crop (enabled), VNI Brochure Image (enabled)

Content Permissions 6.x-2.2 Set field-level permissions for CCK fields.
Depends on: Content (enabled)

Editablefields 6.x-1.2 Allows you to make some view fields editable
Depends on: Content (enabled), Ajax Load (enabled)

FileField 6.x-3.0 Defines a file field type.
Depends on: Content (enabled)
Required by: FileField Meta (disabled), ImageField (enabled), VNI Brochure Image (enabled), Image crop (enabled)

Image crop 6.x-1.0-beta3 Add cropping ability to images using javascript
Depends on: ImageField (enabled), ImageAPI (enabled), Content (enabled), FileField (enabled)

ImageField 6.x-3.0 Defines an image field type.
Depends on: Content (enabled), FileField (enabled)
Required by: Image crop (enabled)

Link 6.x-2.5 Defines simple link field types.
Depends on: Content (enabled)

Node Reference 6.x-2.2 Defines a field type for referencing one node from another.
Depends on: Content (enabled), Text (enabled), Option Widgets (enabled)

Number 6.x-2.2 Defines numeric field types.
Depends on: Content (enabled)

Option Widgets 6.x-2.2 Defines selection, check box and radio button widgets for text and numeric fields.
Depends on: Content (enabled)
Required by: Node Reference (enabled), User Reference (disabled)

Text 6.x-2.2 Defines simple text field types.
Depends on: Content (enabled)
Required by: Colorpicker Widget (enabled), Node Reference (enabled), User Reference (disabled), View Reference (enabled)

View Reference 6.x-2.13 Defines a field type for referencing a view from a node.
Depends on: Content (enabled), Text (enabled), Views (enabled)

Colorpicker 6.x-2.0-rc1 Adds a custom form element type called a colorpicker.
Required by: Colorpicker Widget (enabled)

Database logging 6.10 Logs and records system events to the database.

Help 6.10 Manages the display of online help.

Menu 6.10 Allows administrators to customize the site navigation menu.
Required by: Devel (enabled), Node Trail (enabled), Theme developer (disabled)

OpenID 6.10 Allows users to log into your site using OpenID.

Path 6.10 Allows users to rename URLs.
Required by: Global Redirect (enabled), Pathauto (enabled), Catalog (enabled)

PHP filter 6.10 Allows embedded PHP code/snippets to be evaluated.

Search 6.10 Enables site-wide keyword searching.
Required by: Search 404 (disabled), Search Service (disabled)

Statistics 6.10 Logs access statistics for your site.

Taxonomy 6.10 Enables the categorization of content.
Required by: Forum (disabled), Taxonomy CSV import (enabled), Taxonomy Service (disabled), Catalog (enabled), VNI Banner (enabled), VNI Brochure Image (enabled), VNI IMAGE Service (enabled), VNI Sidebar Nav (enabled)

Update status 6.10 Checks the status of available updates for Drupal and your installed modules and themes.

Devel 6.x-1.16 Various blocks, pages, and functions for developers.
Depends on: Menu (enabled)
Required by: Theme developer (disabled)

ImageAPI 6.x-1.6 ImageAPI supporting multiple toolkits.
Required by: ImageCache (enabled), ImageCache UI (enabled), Image crop (enabled)

ImageAPI GD2 6.x-1.6 Uses PHP's built-in GD2 image processing support.

ImageCache 6.x-2.0-beta9 Dynamic image manipulator and cache.
Depends on: ImageAPI (enabled)
Required by: ImageCache UI (enabled)

ImageCache UI 6.x-2.0-beta9 ImageCache User Interface.
Depends on: ImageCache (enabled), ImageAPI (enabled)

My Campaign Partner 6.x-1.0 My Campaign Partner (custom module adds image submit buttons to ubercart)

Navigate 6.x-1.0-beta3 Adds a framework for supplying navigation tools to Drupal
Required by: Navigate Custom (enabled), Navigate Favorites (enabled), Navigate Menu (enabled), Navigate Search (enabled)

Navigate Custom 6.x-1.0-beta3 Adds a Navigate widget for adding custom html / php code.
Depends on: Navigate (enabled)

Navigate Favorites 6.x-1.0-beta3 Adds a favorites widget to the Navigate module
Depends on: Navigate (enabled)

Navigate Menu 6.x-1.0-beta3 Adds a Navigate widget for displaying a menu tree.
Depends on: Navigate (enabled)

Navigate Search 6.x-1.0-beta3 Adds a search widget to the Navigate module
Depends on: Navigate (enabled)

'me' Aliases 6.x-2.4 Provides links to current user's pages using 'me' instead of the numerical user id.

Add Another 6.x-1.3 Presents users with an option to create another node of the same type after a node is added.

Administer Users by Role 6.x-1.3 Allows users with 'administer users' permission and a role (specified in 'Permissions') to edit/delete other users with a specified role. If the user being edited has multiple roles, the user doing the editing must have permission to edit ALL of the user being edited's roles. Also provides control over user creation. Works well in conjunction with role_delegation.

Advanced help 6.x-1.2 Allow advanced help and documentation.
Required by: Advanced help example (enabled)

Advanced help example 6.x-1.2 A example help module to demonstrate the advanced help module.
Depends on: Advanced help (enabled)

Ajax Load 6.x-1.2 Helper module to load and add JavasScript and CSS data for Ajax-loaded content.
Required by: Ajax load example (disabled), Editablefields (enabled)

Backup and Migrate 6.x-1.2 Backup or migrate the Drupal Database quickly and without unnecessary data.

Better Node Admin Content Form 6.x-6.x-dev Provides usability improvments to the "Edit Content" Page

Clone module 6.x-1.0 Allows users to clone (copy then edit) an existing node.

FCKeditor 6.x-2.0-beta1 Enables the usage of FCKeditor (WYSIWYG) instead of plain text fields.

IMCE 6.x-1.2 An image/file uploader and browser supporting personal directories and user quota.
Required by: IMCE Mkdir (enabled)

IMCE Mkdir 6.x-1.x-dev Allows users manage directories in IMCE
Depends on: IMCE (enabled)

jQuery UI 6.x-1.2 Provides the jQuery UI plug-in to other Drupal modules.
Depends on: jQuery Update (enabled)

Lightbox2 6.x-1.x-dev Enables Lightbox2 for Drupal

Node Trail 6.x-1.x-dev Allows you to add nodes in menu without appearing in the menu.
Depends on: Menu (enabled)

Pathauto 6.x-1.1 Provides a mechanism for modules to automatically generate aliases for the content they manage.
Depends on: Path (enabled), Token (enabled)

Secure Site 6.x-2.3 Enables HTTP Auth security or an HTML form to restrict site access.

SWFObject API 6.x-1.0-beta1 Implements the SWFObject Library, makes it easy for developers to add flash content

Token 6.x-1.11 Provides a shared API for replacement of textual placeholders with actual data.
Required by: Pathauto (enabled), Token actions (enabled), Order (enabled), Cart (enabled), Cart Links (enabled), Edit Cart Item (enabled), File Downloads (disabled), Google Checkout (disabled), Google Analytics for Ubercart (disabled), Payment (disabled), Payment Method Pack (disabled), PayPal (disabled), Shipping Quotes (disabled), Recurring Fees (disabled), Reorder Button (disabled), Reports (enabled), Restrict Qty (enabled), Roles (disabled), Shipping (disabled), Stock (disabled), Tax Report (disabled), Taxes (disabled), UPS (disabled), U.S. Postal Service (disabled), Weight quote (disabled), VNI Brochure Wizard (enabled), Test Gateway (disabled), 2Checkout (disabled), Authorize.net (disabled), Credit Card (disabled), CyberSource (disabled), Flatrate (disabled)

Token actions 6.x-1.11 Provides enhanced versions of core Drupal actions using the Token module.
Depends on: Token (enabled)

Userplus 6.x-2.2 The userplus module provides enhanced user administration features.

Services 6.x-0.13 Provide an API for creating web services.
Required by: File Service (enabled), Menu Service (disabled), Node Service (enabled), Search Service (disabled), System Service (disabled), Taxonomy Service (disabled), User Service (disabled), Views Service (disabled), VNI Brochure Image (enabled), VNI Brochure Wizard (enabled), VNI IMAGE Service (enabled), XMLRPC Server (enabled)

Services - servers
Enabled Name Version Description

XMLRPC Server 6.x-0.13 Provides an XMLRPC server.
Depends on: Services (enabled)

Services - services
Enabled Name Version Description

Node Service 6.x-0.13 Provides a node service.
Depends on: Services (enabled), Node (enabled)

Taxonomy CSV import 6.x-3.1 Allow quick import of complete taxonomies, hierarchical structure or simple lists of terms and properties with a CSV file or by a copy-and-paste text.
Depends on: Taxonomy (enabled)

Ubercart - core

Cart 6.x-2.0-beta6 REQUIRED. Controls the shopping cart for an Ubercart e-commerce site.
Depends on: Conditional Actions (enabled), Order (enabled), Product (enabled), Token (enabled), Store (enabled)
Required by: Cart Links (enabled), Edit Cart Item (enabled), Google Checkout (disabled), Google Analytics for Ubercart (disabled), Payment Method Pack (disabled), Shipping Quotes (disabled), Reorder Button (disabled), Restrict Qty (enabled), VNI Brochure Wizard (enabled), Flatrate (disabled), Shipping (disabled), UPS (disabled), U.S. Postal Service (disabled), Weight quote (disabled)

Conditional Actions 6.x-2.0-beta6 REQUIRED. Create conditional action configurations for taxes, shipping, and more!
Required by: Cart (enabled), Order (enabled), Payment (disabled), Shipping Quotes (disabled), Recurring Fees (disabled), Stock (disabled), Taxes (disabled), Test Gateway (disabled), 2Checkout (disabled), Authorize.net (disabled), Cart Links (enabled), Credit Card (disabled), CyberSource (disabled), Edit Cart Item (enabled), File Downloads (disabled), Flatrate (disabled), Google Checkout (disabled), Google Analytics for Ubercart (disabled), Payment Method Pack (disabled), PayPal (disabled), Reorder Button (disabled), Reports (enabled), Restrict Qty (enabled), Roles (disabled), Shipping (disabled), Tax Report (disabled), UPS (disabled), U.S. Postal Service (disabled), Weight quote (disabled), VNI Brochure Wizard (enabled)

Order 6.x-2.0-beta6 REQUIRED. Receive and manage orders through your website.
Depends on: Conditional Actions (enabled), Token (enabled)
Required by: Cart (enabled), File Downloads (disabled), Google Analytics for Ubercart (disabled), Payment (disabled), Reorder Button (disabled), Reports (enabled), Roles (disabled), Test Gateway (disabled), 2Checkout (disabled), Authorize.net (disabled), Cart Links (enabled), Credit Card (disabled), CyberSource (disabled), Edit Cart Item (enabled), Google Checkout (disabled), Payment Method Pack (disabled), PayPal (disabled), Shipping Quotes (disabled), Recurring Fees (disabled), Restrict Qty (enabled), Shipping (disabled), Stock (disabled), Tax Report (disabled), Taxes (disabled), UPS (disabled), U.S. Postal Service (disabled), Weight quote (disabled), VNI Brochure Wizard (enabled), Flatrate (disabled)

Product 6.x-2.0-beta6 REQUIRED. A module to represent items in an online store. Imagecache and CCK Image field recommended.
Depends on: Store (enabled)
Required by: Attribute (enabled), Cart (enabled), Catalog (enabled), File Downloads (disabled), Add to Cart Image (disabled), Product Kit (enabled), Reports (enabled), Roles (disabled), Stock (disabled), Taxes (disabled), Ubercart Views (enabled), Cart Links (enabled), Edit Cart Item (enabled), Google Checkout (disabled), Google Analytics for Ubercart (disabled), Payment Method Pack (disabled), Shipping Quotes (disabled), Reorder Button (disabled), Restrict Qty (enabled), Shipping (disabled), Tax Report (disabled), UPS (disabled), U.S. Postal Service (disabled), Weight quote (disabled), VNI Brochure Wizard (enabled), Flatrate (disabled)

Store 6.x-2.0-beta6 REQUIRED. Setup the store settings and manage your Ubercart site.
Required by: Credit Card (disabled), Google Analytics for Ubercart (disabled), Product (enabled), Stock (disabled), Taxes (disabled), Test Gateway (disabled), Attribute (enabled), Authorize.net (disabled), Cart (enabled), Cart Links (enabled), Catalog (enabled), CyberSource (disabled), Edit Cart Item (enabled), File Downloads (disabled), Add to Cart Image (disabled), Google Checkout (disabled), Payment Method Pack (disabled), Product Kit (enabled), Shipping Quotes (disabled), Reorder Button (disabled), Reports (enabled), Restrict Qty (enabled), Roles (disabled), Shipping (disabled), Tax Report (disabled), UPS (disabled), U.S. Postal Service (disabled), Ubercart Views (enabled), Weight quote (disabled), VNI Brochure Wizard (enabled), Flatrate (disabled)

Ubercart - core (optional)

Attribute 6.x-2.0-beta6 Allow the customer to choose attributes for a product at checkout.
Depends on: Product (enabled), Store (enabled)

Catalog 6.x-2.0-beta6 Display a hierarchical product catalog page and block.
Depends on: Path (enabled), Taxonomy (enabled), Product (enabled), Store (enabled)

Reports 6.x-2.0-beta6 View reports about your store's sales, customers, and products.
Depends on: Order (enabled), Product (enabled), Conditional Actions (enabled), Token (enabled), Store (enabled)
Required by: Stock (disabled), Tax Report (disabled)

Ubercart - extra
Cart Links 6.x-2.0-beta6 Create specialized links to purchase products from other nodes.
Depends on: Cart (enabled), Conditional Actions (enabled), Order (enabled), Product (enabled), Token (enabled), Store (enabled)

Edit Cart Item Edit an item in the cart
Depends on: Cart (enabled), Conditional Actions (enabled), Order (enabled), Product (enabled), Token (enabled), Store (enabled)

Restrict Qty 6.x-1.1 Restrict the quantity on specified products so that only one may be purchased at a time.
Depends on: Cart (enabled), Conditional Actions (enabled), Order (enabled), Product (enabled), Token (enabled), Store (enabled)

Ubercart Views 6.x-2.0 Create different views on Ubercart data. Such as block for new products, lists of a users purchased products, most popular product etc.
Depends on: Product (enabled), Views (enabled), Views Slideshow (enabled), Store (enabled)

jQuery Update 6.x-1.1 Updates Drupal to use the latest version of jQuery.
Required by: jQuery UI (enabled)

Views 6.x-2.5 Create customized lists and queries from your database.
Required by: Insert view (disabled), Ubercart Views (enabled), View Reference (enabled), Bonus: Views Export (disabled), Bonus: Panels (disabled), Views exporter (disabled), Views Service (disabled), Views Slideshow (enabled), Views UI (enabled)

Views Slideshow 6.x-1.0-beta2 Provides a View type that displays nodes as a jquery slideshow in a single div.
Depends on: Views (enabled)
Required by: Ubercart Views (enabled)

Views UI

cdale’s picture

Could you do me another favor and show me what the output of running the following query on your database returns?

SELECT * FROM menu_router WHERE path LIKE 'user/\%%';

aviddv1’s picture

1.13 KB


cdale’s picture

Hmm.. That all looks fine. How bizarre.

I'm out of ideas at this point. I can understand why you are getting access denied when it redirects to user/0. That makes sense, I just can't understand why user/me/edit would redirect too user/0 with the options you have set.

I haven't had a good look at your module list yet, but i might get to that at somepoint in the next week or so.

If you're willing to get your hands a little dirty, you could try commenting out line 215 of me.module drupal_goto($path);. If that also doesn't work, you could try commenting out the one on line 445 drupal_goto($redirect_path);. Those are the only two places where 'me' will do a redirect, so if it is neither of those lines, then I have no idea.

If that stops the redirection then it is a problem with me that I will need to look into in a bit more detail. One other thing you could possibly try first is resetting the "me alias" settings back to the defaults.

aviddv1’s picture

Figured it out! It was the administerusersbyrole module. I did a backtrace using:

 $backtrace = debug_backtrace();
 foreach ($backtrace as $call) {
   $nicetrace[$call['function']] = $call;
 echo '<pre>'; print_r($nicetrace); echo '</pre>';

I saw that the administerusersbyrole module was performing the redirect. Went into the module and sure enough it checks arg(1) and tries to load the user object. Since 'me' isn't a valid user id, it loads 0 and when it checks if user 0 has permission to edit the role, it fails and redirects to user/0. I hacked it to use the global user to get the uid. Seems to be working. Thanks for checking into this for me.


cdale’s picture

Nice. Thanks for the feedback. It would probably be better to use something like I did in the patch at #449034: More robust access checking however.

Good work on tracking down the problem.

asak’s picture

thanks cdale - i had the same problem and your patch fixed it.

timd.mackey’s picture

Digging this up from the grave, but I had this issue just today with the administerusersbyrole module interfering with the me alias module (Drupal 6.x). @cdale, your patch in #23 for administerusersbyrole did the trick! Thanks a lot!