Hi

I installed Drupal Commerce Kickstart v2 without the sample data but with all other functionalities.
When a user is logged in the user menu still shows '''Log in'' as an option instead of hiding it.

User menu when not logged in: Log in, Create Account
User menu when logged in: Log in, My account, Log out

I didn't change the user menu or the core user module.
I did a second instal with sample data and it's working fine there.

I've ignored this problem at first and already build almost my intire site so re-install is not an option.

How do I fix this?

Comments

john_b’s picture

If you are using mysql database open it in a tool like phpmyadmin, open the menu_router table, and find the row with path user/login. The access callback column for that row should be user_is_anonymous. If it is not, edit it to be that.

Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors

ThaJoa’s picture

user/login's access_callback and all others are set to ''_chain_menu_access_callback''' in my MySQL db.
Tried changing it to ''user_is_anonymous'' but didn't work.
It automatically changed back to ''_chain_menu_access_callback'' after cache flush and server restart.

Thanks anyway.

john_b’s picture

I set up a clean install of the latest version of Commerce Kickstart in order to answer your question. I have looked at it again at the installation I made for this post and can confirm that the http://drupal.org/project/chain_menu_access module which creates this access callback is not there. Therefore, unless there are key facts about your installation which you have not shared in your post, there is something bizarre going on with your site. You may need to search for, disable and properly uninstall Chain Menu Access and its dependencies.

Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors

ThaJoa’s picture

Yes I installed the Chain Menu Access module cause it was needed for the Path Access module (http://drupal.org/project/path_access). That last one was causing the problem, after disabling it the log in button disappeared like it should and everything worked like normal.

I'm new to Drupal and wouldn't have found this by myself, thank you very much sir! :)

john_b’s picture

You are welcome.

It would be possible to reinstate the module and then fix the problem. The 'correct' way would be another module. The easy way would be to make a child theme or custom theme (it is best not hack existing contributed themes) then hide this login link for logged in users in the theme. Unless you have some experience of coding in php I would advise you to leave it alone, and I am not planning to give full details of how to do it (though someone might help out in the module development or theme development forums). But if you have the appetite to play around with it, this thread gives some pointers http://drupal.org/node/310296. If it is done in the theme then obviously it will only work in the theme you are using, and will stop working if you ever switch to a different default theme.

Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors