Page 1 of 3

Frontend login error:“You cannot access the private section"

Posted: Thu Jun 06, 2013 8:00 pm
by HardstylerDK
When a users attempts to login to the site, the below message displays:
“You cannot access the private section of this site.”
I checked the global config permissions, everything seems fine. I am not sure what am I missing.

The only way for a user to login, is to have super user permission, or to login through social (facebook,twitter,google).

I've checked that nothing on the pages are set to anything other than public access, from articles, article categories to menus plugins.

I've also tried disabling all non-standard joomla plugins, components, modules etc.

After setting up a test-environment, I've tried to delete all users and creating a test user, which didn't help either.

Thought that it might could be a problem with the login module (Improved Ajax Login & Register), so i tried with the standard joomla login module, still same problem.

After all that i tried changing template, overwriting plugins, libraries etc., to correct any errors or problems in the joomla core files - still no luck. :(

Right now i'm in the need of some professional help, figuring this error out.

Re: Frontend login error:“You cannot access the private sect

Posted: Sat Jul 27, 2013 5:16 am
by breeze29
Were you able to resolve? If so, how? Please share. I have same issue since upgrading J2.5.11 to J2.5.13. I've tried to going to Global Confi >> Permission and ensure that the Administrator user group privileges are set to "allow" for Site Login and Admin Login. onlyworking option right now is setting a users' group to Super Admin.

Re: Frontend login error:“You cannot access the private sect

Posted: Sun Jul 28, 2013 12:41 am
by mcsmom
Can you please check your assets table in the database and see if there is more than one row with a parent_id of 0?

Re: Frontend login error:“You cannot access the private sect

Posted: Sun Jul 28, 2013 12:41 am
by mcsmom
Can you please check your assets table in the database and see if there is more than one row with a parent_id of 0?

Re: Frontend login error:“You cannot access the private sect

Posted: Sun Jul 28, 2013 7:06 am
by carsten888
I got this same issue and got about 420 rows with parent_id 0.

What to do now?

Right after the update to 2.5.13 I checked extensions > database and extensions > warnings. Both were ok.

Re: Frontend login error:“You cannot access the private sect

Posted: Sun Jul 28, 2013 11:39 am
by mcsmom
You should never have a parent_id of 0. Are they all for one extension? I saw a report where it was happening for JEvents. if nothing else you should change all but the root to 1 or if they are all for the same extension change it to the asset id for that extension.

Re: Frontend login error:“You cannot access the private sect

Posted: Mon Jul 29, 2013 3:08 am
by colin99
mcsmom wrote:You should never have a parent_id of 0. Are they all for one extension? I saw a report where it was happening for JEvents. if nothing else you should change all but the root to 1 or if they are all for the same extension change it to the asset id for that extension.
I am versed with PhpMyAdmin -

Please tell me how to do this.

Thanks!

Re: Frontend login error:“You cannot access the private sect

Posted: Mon Jul 29, 2013 6:43 am
by mcsmom

Re: Frontend login error:“You cannot access the private sect

Posted: Mon Jul 29, 2013 7:57 am
by carsten888
mcsmom wrote: if nothing else you should change all but the root to 1 or if they are all for the same extension change it to the asset id for that extension.
Yep that made it work!

Thank you very much.

Here are the sql statements I ran in PHPmyadmin:

Code: Select all

UPDATE `prefix_assets` SET `parent_id`=1

Code: Select all

UPDATE `prefix_assets` SET `parent_id`=0 WHERE `title` = 'Root Asset'
change 'prefix' to whichever prefix your database has.

Might be nice to have a check for this issue in the database checker in the extension-manager.

Re: Frontend login error:“You cannot access the private sect

Posted: Mon Jul 29, 2013 3:26 pm
by mcsmom
Yes I've thought about that although the issues are not simple in general even though in each site they are usually simple.

Re: Frontend login error:“You cannot access the private sect

Posted: Mon Jul 29, 2013 3:50 pm
by colin99
Whew! I think you have fixed this for me.

e-mail me your PayPal account - I would like to
buy you a bag of coffee or a bottle of wine.

No good Joomla deed should go unrewarded!
carsten888 wrote:
mcsmom wrote: if nothing else you should change all but the root to 1 or if they are all for the same extension change it to the asset id for that extension.
Yep that made it work!

Thank you very much.

Here are the sql statements I ran in PHPmyadmin:

Code: Select all

UPDATE `prefix_assets` SET `parent_id`=1

Code: Select all

UPDATE `prefix_assets` SET `parent_id`=0 WHERE `title` = 'Root Asset'
change 'prefix' to whichever prefix your database has.

Might be nice to have a check for this issue in the database checker in the extension-manager.

Re: Frontend login error:“You cannot access the private sect

Posted: Tue Jul 30, 2013 10:35 am
by Runner64
Our problem is also solved for now! We ran the codes in PHPmyadmin mentioned above. THX to all of you.

Re: Frontend login error:“You cannot access the private sect

Posted: Tue Jul 30, 2013 6:04 pm
by mcsmom
For anyone reading this, I've changed my suggestion slightly to say before going to phpmyadmin, try clicking the rebuild button in any category manager. In my tests if the problems were all in category assets this fixed.

Re: Frontend login error:“You cannot access the private sect

Posted: Wed Jul 31, 2013 3:35 pm
by Orpheus2510
This do not work for JEvent categories. For JEvents you can say, that the problem with parent_ids = 0 only appears when the site was migrated from J1.5 - so the categories originally were created under J1.5. JEvents categories created under J2.5 or J3.x do not have a parent_id 0.

Re: Frontend login error:“You cannot access the private sect

Posted: Thu Aug 01, 2013 6:17 am
by carsten888
So use this code to just fix those rows which are broken.

Code: Select all

UPDATE `prefix_assets` SET `parent_id`=1 WHERE `parent_id`=0

Re: Frontend login error:“You cannot access the private sect

Posted: Fri Aug 02, 2013 2:33 pm
by sovainfo
carsten888 wrote:So use this code to just fix those rows which are broken.

Code: Select all

UPDATE `prefix_assets` SET `parent_id`=1 WHERE `parent_id`=0
No, should be:

Code: Select all

UPDATE `prefix_assets` SET `parent_id`=1 WHERE `parent_id`=0 AND id>1

Re: Frontend login error:“You cannot access the private sect

Posted: Fri Aug 02, 2013 6:06 pm
by mfuller526
I ran both SQL codes:

Code: Select all

UPDATE `prefix_assets` SET `parent_id`=1 WHERE `parent_id`=0 AND id>1
UPDATE `prefix_assets` SET `parent_id`=0 WHERE `title` = 'Root Asset'
Several rows were changed. But I still can't login (as registered) with the standard joomla login module. Extension manager > database AOK. Here's error displayed:

Code: Select all

drcraigjohnson.nethttp://drcraigjohnson.net/index.php/site-map76.173.9.35/index.php/site-mapMozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.59.8 (KHTML, like Gecko) Version/5.1.9 Safari/534.59.8500
Suggestions? Thanks! Joomla 2.5.14

Re: Frontend login error:“You cannot access the private sect

Posted: Fri Aug 02, 2013 11:07 pm
by mcsmom
You may have additional problems in your asset table. The parent_id == 0 is just the worst one.

Re: Frontend login error:“You cannot access the private sect

Posted: Sat Aug 03, 2013 3:26 am
by mfuller526
Thanks for writing. Here's a screenshot of part of my asset table. All parents are 1 except the root asset.
FirefoxScreenSnapz010.png

Re: Frontend login error:“You cannot access the private sect

Posted: Sat Aug 03, 2013 12:21 pm
by mcsmom
But you should have more rows ... is tht that whole table? You should have a row for each category and one for each article ... do you see how the root asset has rgt of 798? And also that content has a really big gap? YOu should have assets in there.

Re: Frontend login error:“You cannot access the private sect

Posted: Sat Aug 03, 2013 6:31 pm
by gjrweb
Let's try to fix this quickly, thanks for your input!

Horrible updates on Joomla lately :-\

Re: Frontend login error:“You cannot access the private sect

Posted: Sat Aug 03, 2013 7:00 pm
by gjrweb
Did fix also my issue! :D

Issue was caused by an upgrade from 2.5.11 to 2.5.14 btw...

Re: Frontend login error:“You cannot access the private sect

Posted: Sat Aug 03, 2013 8:07 pm
by eftie
Did fix also my issue! :D

Caused by an upgrade from 2.5.11 to 2.5.13
After fixin with code mentioned above and upgrade to 2.5.14 all still worked :-)

Re: Frontend login error:“You cannot access the private sect

Posted: Sat Aug 03, 2013 8:13 pm
by colin99
UPDATE `prefix_assets` SET `parent_id`=1 WHERE `parent_id`=0 AND id>1
UPDATE `prefix_assets` SET `parent_id`=0 WHERE `title` = 'Root Asset'

Run separately via PhpMyAdmin fixed the issue on my websites (one of which
has a paid subscription service...)

I really, really appreciate the Joomla community and how responsive they are -

If I have one question about this issue (which I now understand more broadly...):

What part of the Joomla upgrade would cause this issue to manifest itself?
I imagine that subsequent updates in Joomla will cause this issue to appear
again -- unless of course the user has not already fixed their problem.
I have done the most recent updates from 24 hours ago and no issues have appeared.

An subsidiary question would also be: Has this "asset" issue existed for some time
in resident MySQL db's and it is just the "core" update that has caused the problem to be revealed?

Many thanks to the team! :geek:

Re: Frontend login error:“You cannot access the private sect

Posted: Sat Aug 03, 2013 10:52 pm
by mcsmom
I just want to point out that parent_id for a category should never really be 1. It solves the specific issue to do this, but you still have a corrupt asset table if you are doing this and that will cause other problems down the road. I'm currently working on updating assetFix to deal with this but in the mean time the parent id of any category should definitely at least be the asset tabke id of the component that category is part of.


Yes you have probably had this issue a long time but a bug fix that addressed the performance prolbems that sites with multiple parent ids of 0 had caused this problem.i

In the meantime, I think that what causes the issue is a bug that at one point was in jupgrade. It took the parent_ids from the categories table (which are 1 for top level categories). Then somehow it said since this has a parent of 1 in the category table. That is the category root which is not an asset and has an asset_id of 0. So it got that asset_id of 0 and put it in the parent_id field in the asset table.

That's my theory anyway.

Re: Frontend login error:“You cannot access the private sect

Posted: Sat Aug 03, 2013 11:49 pm
by DavidBoggitt
mcsmom wrote:I just want to point out that parent_id for a category should never really be 1. It solves the specific issue to do this, but you still have a corrupt asset table if you are doing this and that will cause other problems down the road. I'm currently working on updating assetFix to deal with this but in the mean time the parent id of any category should definitely at least be the asset tabke id of the component that category is part of.
Feeling very queezy about this... those SQL statements fixed this for now, but I'm currently building event booking and payment into a 2.5 site that I think has a corrupt asset table. Not a very nice feeling :(

Re: Frontend login error:“You cannot access the private sect

Posted: Sun Aug 04, 2013 1:56 am
by mcsmom
https://github.com/elinw/AssetFix
Okay try this.

Download that file and place it in your website root.
Browse to it mydomain.com/assetfix.php

It will run, and probably take a while because it is checking each row, but it will definitely fix the 0 or 1 parent_id issue.

Re: Frontend login error:“You cannot access the private sect

Posted: Sun Aug 04, 2013 1:58 am
by mfuller526
Bingo! This one-two punch solved it. You may or may not need all.

First, I ran these SQL queries mentioned above:

Code: Select all

UPDATE `prefix_assets` SET `parent_id`=1 WHERE `parent_id`=0 AND id>1
UPDATE `prefix_assets` SET `parent_id`=0 WHERE `title` = 'Root Asset'
Note: change prefix to your database extension (Global configuration > Server > Database Settings > Database Tables Prefix)

Two, repair/reconstruct your assets table. Important -Read this: http://docs.joomla.org/Fixing_the_assets_table

In a nutshell you'll 1. Category Manager > rebuild your categories
2. make a tempCategory named after each of your categories, 3. Using the batch process in article manager move (do NOT copy) all your articles into their respective tempCategories then 4. batch move them back to their original category.


FYI I also read some threads where AssetFix (on GitHub) was used. https://github.com/elinw/AssetFix

Special thanks to mcsmom :)

Re: Frontend login error:“You cannot access the private sect

Posted: Sun Aug 04, 2013 2:49 am
by colin99
mfuller526 wrote:
Special thanks to mcsmom :)
Yea. My hero too.

We need to reward our Joomla gurus more often.

Re: Frontend login error:“You cannot access the private sect

Posted: Sun Aug 04, 2013 6:16 am
by carsten888
mcsmom wrote:I think that what causes the issue is a bug that at one point was in jupgrade.
I think so too.
There where also loads of issues with menu-item properties not being converted to their new 2.5 names with jupgrade. I had to run a couple of scripts to fix those after the updates. So I would not be surprised if this issue is from jupgrade as the only sites with this issue are site which have been upgraded with jupgrade.