Magento: Parent Role id ‚G4‘ does not exist (or other ids)

2. September 2011 at 11:35

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,

Daniel Briegert

Daniel Briegert

xing: https://www.xing.com/profile/Daniel_Briegert

More Posts - Website

Follow Me:
TwitterFacebook