MODx version 0.9.6.1p2
Version codename rev 3281
Server: Apache/1.3.37 (Unix) PHP/4.4.7
All had been going fine with my ModX installation until today. When I log into the manager I can view the entire contents of the document tree with no issues but when I click on one of the documents to view the details for it I get the following javascript alert "You don’t have enough privileges for this action!". I get it no matter if I just choose to view the document or when I try to edit. The public site displays without issues.
Looked at the underlying database tables relating to users and roles and can see no problems there. Uploaded all files again to serve except config_inc.php which I have made no changes to since installation.
I decided I would look for that error string in the codebase and located it in manager/includes/error.class.inc.php. The function that produces the alert box is called dumpError() so I commented out the contents of that to see if I could see an underlying error. Now when I try to view a page I get all the attributes such as long title, title etc as ’Not set" even though I can see from the public site that they are fine.
Looks like I will have to dig a bit futher into how that summary page is displayed to track down the problem.
Anyone got any ideas on why this would suddenly happen? I’m running the site as utf-8 so it isn’t coming from that known bug.
Please help!
On some further investigation of this I have learned that to display the summary of a page’s information the include manager/assets/document_data.static.php is used and looking at that the dumpError() function mentioned earlier was being called because the query to pull up the pages details was not returning a result set from which sql_num_rows() could get a value.
As an experiment I backed up and then truncated the document_groups table and sure enough, now all pages can be displayed correctly. So I guess now I need to figure out what that table does because in my setup it is misbehaving when it had data in it.
Don’t think I’m alone here when I say that the document groups concept is a difficult one to grasp so maybe someone can point me at some good resources to explain it.
-
☆ A M B ☆
- 24,524 Posts
Document groups by themselves don’t do anything. However, when connected to user groups (the third tab does the connecting) then any document assigned to that document group can only be worked with by a manager user who belongs to the associated user group.
Likewise, if the document group is connected to a web user group, then only web users logged in and belonging to the associated web user group can see the page.
Web user groups are totally separated from manger user groups, but the same document group can be used to connect to either user group type.
As to why it’s giving you trouble, maybe somebody else who didn’t understand the system created user groups and document groups and connected them?
You also might want to check your roles; they determine what a user can do. The groups determine what the user can do it to.