tips.paddyonline.net

If you need tips & tricks, here they are...

Joomla error 'You cannot access the private section of this site.'

Got the error "You cannot access the private section of this site." on one of my sites when trying to login as a "normal" user in front-end.

This was a pretty interesting issue to find and resolve.
It's an database 'error' of sorts that is pretty simple to fix.
First of all this is all due to a parent<-child condition that has gone horribly wrong in an update or something else.
Most likely you will find this issue in the table "assets".
You will need to find your database prefix fist of all, easiest found in the configuration and the option "$dbprefix". I will call it "prefix_" here for ease of typing.

So to find if you have this issue you can run the following in an sql manager of your choosing (mysql or phpmyadmin shoulden't make any differents, i did it in the cli mysql)

SELECT id,parent_id,title FROM `prefix_assets` WHERE parent_id=0;


If you find that there are multiple rows then hit the above do the following

UPDATE `prefix_assets` SET parent_id=1 WHERE parent_id=0 AND NOT id=1;


You should also verify that the "Root Asset" has id 1 and parent_id 0

SELECT id,parent_id,title FROM `prefix_assets` WHERE id=0 OR parent_id=0;

this should give the result

id parent_id title
 1 0 Root Asset


if not run
UPDATE `prefix_assets` SET parent_id=0 WHERE title="Root Asset";


This should have fixed the issue.

Comments   

0 #25 Joomla error 'You cannot access the private section of this site.x 2016-03-26 20:25
I have searched this topic multiple times and the way you explained the fix was the easiest method out there.
I would like to add that I am using Joomla 3.5 and what I found were two different prefix entries for assests. I wasn't able to find the additional entry until searching deeper. My entry popped up a false and since I am not sure if I need it, I just changed it to ID_1.

I realize my error occurred while changing user level permission in a component and not logging out on the front-end before testing things out. Something that was mentioned from someone before is when changing permission like that is do one thing at a time as to not confuse the DB while it works.
Thanks again
Quote | Report to administrator
0 #24 RE: Joomla error 'You cannot access the private section of this site.'Chip F. 2014-09-27 14:22
THANK YOU! You just saved me hours of frustration. My site now accepting logins again.
Quote | Report to administrator
0 #23 Another thank youGraham 2014-06-12 01:15
Thanks for posting this and to google for helping me find you!

A simple fix, when you know what the problem is!
Quote | Report to administrator
0 #22 RE: Joomla error 'You cannot access the private section of this site.'Silikonski 2014-03-31 18:58
WOW! Thank you sooo much! :) Spent months trying to find solution for this error after update. What a bug!
Quote | Report to administrator
0 #21 ThanksShiju 2014-03-29 10:25
Thanks.It works for me.Great effort
Quote | Report to administrator
0 #20 Thanks!Jeremy Webb 2014-03-19 16:06
Brilliant! I have no idea how you discovered that, but I'm very grateful.

Regards,

Jez.
Quote | Report to administrator
0 #19 RE: Joomla error 'You cannot access the private section of this site.'drhiii 2014-03-10 09:47
Thank you! This worked. Have been wrestling with this for a week until I found this thread. THANK YOU. Sending karmic vibes....
Quote | Report to administrator
0 #18 RE: Joomla error 'You cannot access the private section of this site.'Kunle 2014-03-07 19:44
Thanks for this fix. It worked just as explained above. I suspect my the upgrade from 2.5.* -> 2.5.18 caused it
Quote | Report to administrator
0 #17 Thank youTyler 2014-03-04 20:44
Just wanted to take the time to say thanks, this resolve an issue that occurred when migrating from 2.5.4 to 2.5.18
Quote | Report to administrator
0 #16 RE: Joomla error 'You cannot access the private section of this site.'Samantha 2014-02-20 20:26
You are AMAZING AMAZING AMAZING!!!!!!!! ! Thank you so so so so so much for this fix! FINALLY managed to get the site working properly again with your fix! Definitely bookmarking this for "in case" :)
Quote | Report to administrator

Add comment