Magento

eCommerce Software for Online Growth

Magento Forum

From setting up your store to managing your products, pages and promotions to generating detailed reports, the Magento User Guide empowers the user to utilize the platform for all of its vast capacity.
Available in eBook and Print formats – Download Now!!!
   
Page 1 of 2
Parent Role id ‘G4’ does not exist - WHAT? 
 
Dekard
Sr. Member
 
Total Posts:  80
Joined:  2008-06-03
 

So I’m happily using the magento store the yesterday and when I tried to login to the admin area from a different computer than usual I got “Parent Role id ‘G4’ does not exist” and quite a bit more code… and that was it… Now the same problem has affected all computers that I’m trying to use to admin the site. Que pasa? This site has been working fine and there haven’t been any upgrade to Magento since I did a clean in stall of 1.1.1 and the modern theme. I’d like to correct this and upgrade to 1.1.3.

Oh, the front end and the downloader seem to still work fine. I have not considered using the downloader to upgrade the install, at least not until this issue is corrected. I was part of the 1.0 to 1.1 upgrade disaster and I’m not going to repeat that.

Here’s the rest of the error message:

Parent Role id 'G4' does not exist

#0 /home/jesproc/public_html/lib/Zend/Acl.php(124): Zend_Acl_Role_Registry->add(Object(Mage_Admin_Model_Acl_Role_User), 'G4')
#1 /home/jesproc/public_html/app/code/core/Mage/Admin/Model/Mysql4/Acl.php(100): Zend_Acl->addRole(Object(Mage_Admin_Model_Acl_Role_User), 'G4')
#2 /home/jesproc/public_html/app/code/core/Mage/Admin/Model/Mysql4/Acl.php(69): Mage_Admin_Model_Mysql4_Acl->loadRoles(Object(Mage_Admin_Model_Acl), Array)
#3 /home/jesproc/public_html/app/code/core/Mage/Admin/Model/Session.php(58): Mage_Admin_Model_Mysql4_Acl->loadAcl()
#4 /home/jesproc/public_html/app/code/core/Mage/Admin/Model/Observer.php(49): Mage_Admin_Model_Session->login('dekard', 'oc9559968', Object(Mage_Core_Controller_Request_Http))
#5 /home/jesproc/public_html/app/code/core/Mage/Core/Model/App.php(1096): Mage_Admin_Model_Observer->actionPreDispatchAdmin(Object(Varien_Event_Observer))
#6 /home/jesproc/public_html/app/Mage.php(271): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#7 /home/jesproc/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(385): Mage::dispatchEvent('controller_acti...', Array)
#8 /home/jesproc/public_html/app/code/core/Mage/Adminhtml/Controller/Action.php(117): Mage_Core_Controller_Varien_Action->preDispatch()
#9 /home/jesproc/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(336): Mage_Adminhtml_Controller_Action->preDispatch()
#10 /home/jesproc/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Admin.php(137): Mage_Core_Controller_Varien_Action->dispatch('index')
#11 /home/jesproc/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(168): Mage_Core_Controller_Varien_Router_Admin->match(Object(Mage_Core_Controller_Request_Http))
#12 /home/jesproc/public_html/app/Mage.php(420): Mage_Core_Controller_Varien_Front->dispatch()
#13 /home/jesproc/public_html/index.php(46): Mage::run()
#14 {main}

 Signature 

http://www.jespro.com

 
Magento Community Magento Community
Magento Community
Magento Community
 
Dekard
Sr. Member
 
Total Posts:  80
Joined:  2008-06-03
 

bump. still looking for a solution to this one.

 Signature 

http://www.jespro.com

 
Magento Community Magento Community
Magento Community
Magento Community
 
Dekard
Sr. Member
 
Total Posts:  80
Joined:  2008-06-03
 

Its kind of a problem now since there are orders to process and no way to access the admin area… Suggestions please!

 Signature 

http://www.jespro.com

 
Magento Community Magento Community
Magento Community
Magento Community
 
Dekard
Sr. Member
 
Total Posts:  80
Joined:  2008-06-03
 

an upgrade to 1.1.3 using Magento Connect had no effect. I’ll try a complete replacement of the existing file and directory structure now.

 Signature 

http://www.jespro.com

 
Magento Community Magento Community
Magento Community
Magento Community
 
Dekard
Sr. Member
 
Total Posts:  80
Joined:  2008-06-03
 

A complete overwrite had no effect. So, both a 1.1.1 to 1.1.3 upgrade and a clean install of 1.1.3 didn’t resolve the issues. I’m back to 1.1.1 while I continue to diagnose the problem.

I’d appreciate any suggestions.

 Signature 

http://www.jespro.com

 
Magento Community Magento Community
Magento Community
Magento Community
 
Dekard
Sr. Member
 
Total Posts:  80
Joined:  2008-06-03
 

bump, why have I gotten zero responses here?

 Signature 

http://www.jespro.com

 
Magento Community Magento Community
Magento Community
Magento Community
 
SimpleHelix.com
Guru
 
Avatar
Total Posts:  472
Joined:  2007-08-31
Huntsville, AL
 

i feel your pain....but i don’t think anyone knows the answer to your problem.

 Signature 

SimpleHELIX, LLC
A World-Class Magento Web Hosting company - Providing scalable, reliable, and secure enterprise hosting solutions
The creators of super-fast performance hosting. Find out more @ http://www.simpleHELIX.com

 
Magento Community Magento Community
Magento Community
Magento Community
 
Dekard
Sr. Member
 
Total Posts:  80
Joined:  2008-06-03
 
SimpleHelix.com - 25 August 2008 09:37 PM

i feel your pain....but i don’t think anyone knows the answer to your problem.

At least not anyone posting on the forums.

After spending quite a few hours digging through the database I was able to uncover the problem and resolve it. I’ll post my solution here so it may help someone else in the future.

First, some background and context. Magento uses at least 3 database tables to keep track of admin roles, users and roles. They are called admin_roles, admin_rules and admin_users. Within those three tables you’ll see defined your primary admin role (basically a ‘super-admin’). This is always G1, which I believe stands for ‘Group 1’. It is comprised of two items, role_type (either U or G) and role_id which is always a number and counts up with both roles and users.

Your first user will be an ‘U’ and have a parent_id of 1. The parent_id indicates which role\group the user is a part of and the ‘U’ indicates that this is a user and not a group.

The error “Parent Role id ‘G4’ does not exist” meant that Group 4 was broken. I didn’t take the time to track down exactly what db error was causing it to be broken in my case since I am satisfied to have it corrected. As you have probably guessed, G4 wasn’t the primary account, in fact it was a ‘sales \ support’ account I created for the invoicing and shipping needs of my place. Evidently when I created a new user account and assigned it to the G4 role it caused some form of corruption to just the G4 role and users.

Now, here’s where the developers need to make an adjustment. When Magento isn’t happy with a role, even if its a differnt level role then you are trying to login with, no one else is allowed to login. So, even though my account has much higher privileges than the G4 role I couldn’t login. A much more elegant failure would allow users of a different role to login and only block those with the specific issue.

To fix it I went into the three tables I mentioned above and deleted all references to roles and users except the G1 role and the first G1 user. Immediately I was granted access and all was well with the world. I’ll go through later today and recreate the other needed roles and users and I’ll post here if I find anything interesting.

So, problem solved by digging. How I wish there was ANY documentation on this in the wiki, forums or elsewhere. No where I could find anything on this issue. Varien has a lot of documentation to release still and I can’t wait till they do it.

 Signature 

http://www.jespro.com

 
Magento Community Magento Community
Magento Community
Magento Community
 
SimpleHelix.com
Guru
 
Avatar
Total Posts:  472
Joined:  2007-08-31
Huntsville, AL
 

That is a very good piece of information!
Finally someone actually explaining something in plain english.....

I hope these type of posts gets collected in the wiki, it doesn’t deserve to be lost in the archives =(

 Signature 

SimpleHELIX, LLC
A World-Class Magento Web Hosting company - Providing scalable, reliable, and secure enterprise hosting solutions
The creators of super-fast performance hosting. Find out more @ http://www.simpleHELIX.com

 
Magento Community Magento Community
Magento Community
Magento Community
 
Dekard
Sr. Member
 
Total Posts:  80
Joined:  2008-06-03
 

Thanks SH, it took me many hours to find this information, the least I can do is make sure its publicly available to save someone else this problem.

Unfortunately when I went to recreate the admin roles I need for day to day admin of the site the same error poped up. Apparently there’s an underlying DB problem that is revealed whenever I try to setup those users. Its going to be quite a pain and something that will have to be resolved. I’ll post more when I have information.

 Signature 

http://www.jespro.com

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ludvig
Jr. Member
 
Total Posts:  1
Joined:  2007-11-20
 

I bumped into this problem too. After some digging I realized that magento reads the rows from the database table admin_role in the “wrong” order. That is it reads the user entry before the parent group (the role) is loaded. This happends because the user rows has a tree_level = 1, when they should have tree_level = 2 or more.

Solution:

To fix a broken admin-interface, run the following query in the magento database:
UPDATE admin_role SET tree_level = 2 WHERE role_type = “U”;

To prevent the error from happening again:
Open up the file app/code/core/Mage/Admin/Model/Mysql4/User.php

On line 162 (or close to that line) you find a row that says:
‘tree_level’ => $row[’tree_level’] + 1,

change this line to:
‘tree_level’ => $row[’tree_level’] + 2,

That should do it!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Georges@Bitbol
Member
 
Avatar
Total Posts:  75
Joined:  2008-08-08
Paris
 

Nice !!
What I do not understand is that tree_level are ok for me in dev and not in preproduction !!!

Thanks a lot

 
Magento Community Magento Community
Magento Community
Magento Community
 
Dekard
Sr. Member
 
Total Posts:  80
Joined:  2008-06-03
 

This is still a problem with 1.1.6. Bizarre that it hasn’t been fixed yet.

 Signature 

http://www.jespro.com

 
Magento Community Magento Community
Magento Community
Magento Community
 
ReinierTV
Jr. Member
 
Avatar
Total Posts:  1
Joined:  2008-09-11
Netherlands
 

@ Ludvig: Thank you for digging in and posting your findings it helped me out too!

Yesterday I had the same weird experience of suddenly not being able to access the Magento back-end. After some browsing through the posts here I found your solution and it worked like a charm for me, thank you!

Rgds,
Reinier

 
Magento Community Magento Community
Magento Community
Magento Community
 
ANoel
Jr. Member
 
Total Posts:  19
Joined:  2008-08-27
 

Hi,

@ Ludvig : Thank you so much for your so great solution… I had the same problem several times without finding anything, the only solution I found was to delete all new users, it wasn’t important… but now I need them

It’s strange, it’s still not fixed even in new 1.1.7. Maybe Ludvig, you should report the bug and give the solution you found…

Thanks again,
Audrey

 
Magento Community Magento Community
Magento Community
Magento Community
 
thE_iNviNciblE
Sr. Member
 
Avatar
Total Posts:  199
Joined:  2008-01-09
Oldenburg
 
Dekard - 20 October 2008 07:29 AM

This is still a problem with 1.1.6. Bizarre that it hasn’t been fixed yet.

i’ve this error with 1.1.8 ... it’s really strange…

i put this message to the bugtraq system…

 Signature 

"Wissen ist Macht” (1597) - Sir Francis Bacon
-----------------------------------------------------------------------
Blog: Cubss.net
PHP-Consulting: PHP-Consulting - Magento

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 1 of 2
 
© Copyright 2010 Varien. Magento, eCommerce software, is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
177732 users|1019 users currently online|277197 forum posts