Page 1 of 1

Tips: "You are not authorized to view this resource. You need to login."

Posted: Fri Nov 18, 2005 8:15 pm
by rsphaeroides
Public items cannot be viewed by the public.  Instead they see the error message "You are not authorized to view this resource. You need to login."

The number of reasons for seeing this error message is almost as numerous as the posts asking for help on it. Many of these issues are discussed under other topics (especially Itemid) but I thought it might be helpful to pull them together in one place. Below are some of the things you can check.

Really easy fixes (that sometimes work)
1. Trash! Permissions and settings are sometimes pulled from the trash.  Empty it!
2. Cache! Never seen anyone say that this definitely solved their problem because they usually do a bunch of other stuff at the same time and can't be sure, but it’s been suggested in dozens of posts.  Can’t hurt, clear them all (browser, program and database)
3. Turn on SEF and/or install a third party SEF component.
Thirty some odd pages of discussion of this over on mamboserver
http://forum.mamboserver.com/showthread.php?p=287541#post=603
kenmcd's rather briefer explanation
http://forum.joomla.org/index.php/topic,4259.msg53038.html#msg53038


Publishing and Permissions:
You must have all of the following published, permissions set to public,
1. Content item
2. Category the content item belongs to
3. Section the Category belongs to
Additionally the publication start and end must encompass today and now.  The “Start Publishing:” date and time must be before the current date and time of your server and the “Finish Publishing:” date and time must be after the current date and time of your server.
See attached screenshots of the backend content>>content item manager>>content item: edit  if you don't know where to check this.


Linking to Menus:
1. You must have the content item linked to a menu and the permissions on the menu and menu item must be set to public.  The menu does not have to be published.
2. Linking the content item to more than one menu can cause problems if one of the menus has permissions other than public. Mambo/Joomla will apply the most restrictive or the first permission it comes across depending on the case.  Any Menu or menu item set to “registered” or “special” could cause the error.
3. Menus and menu items (and maybe other things?) in the trash can cause problems (see below)


Specific instances and solutions (where they’ve been discovered):
1. The readmore link does not work.  Solution-Core Hack
http://forum.joomla.org/index.php/topic,4259.msg37548.html#msg37548
2. Users cannot add content.
3. I’m using an add-on menu system or some of my pages don’t appear on menus-all of my content gives "You are not authorized to view this resource. You need to login."
Solution-Hidden menu
http://forum.joomla.org/index.php/topic,4259.msg34432.html#msg34432
4. Expired items still generate links in searches and tables-these links lead to "You are not authorized to view this resource. You need to login." error pages
Solution-Manually unpublish the item.  Apparently expiration is not necessarily automatically linked to unpublishing.
Possible Solution-hack
http://forum.joomla.org/index.php/topic,15338.msg96432.html#msg96432
5. Expired session cookie and daylight savings time.
Possible Solution-Install latest version of Joomla more discussion on this thread
http://forum.joomla.org/index.php/topic,17423.0.html


Other bits that can cause or contribute to this issue:
This is far from a comprehensive list, but these have shown up in other posts eventually identifying them as the culprit.  If you are using any of these you may want to try disabling them temporarily to see if that solves the problem.

1. Community builder component (pre CB2 versions, no known issues with CB2)
2. discussbot mambot
3. hotproperty discussion http://forum.joomla.org/index.php/topic ... l#msg46899
4. Any add-on that has an independent registration feature. (real estate, photo gallery, shopping…)

Re: FAQ: "You are not authorized to view this resource. You need to login."

Posted: Wed Feb 15, 2006 3:41 am
by draden
Another quick fix I didn't notice mentioned here that fixed the issue for me was an issue with my server time. When I would create static content the publish time and date were in the future because the time was set different. So simply creating a piece of static content and making the publish date the day before, I don't get the issue anymore.

Hope that helps!

Re: FAQ: "You are not authorized to view this resource. You need to login."

Posted: Thu Mar 02, 2006 4:13 pm
by guilliam
MOD NOTE: All Discussion on this thread can be done HERE:

http://forum.joomla.org/index.php/topic,42648.0.html

Re: Tips: "You are not authorized to view this resource. You need to login."

Posted: Tue Nov 20, 2007 1:08 pm
by publipoint
I just found out this. A link like

Code: Select all

http://www.affaroni.ch/index.php?option=com_content&task=view&id=16&Itemid=16


would give me the warning. Then, I tried

Code: Select all

http://www.affaroni.ch/index.php?option=com_content&task=view&id=16

and boum!, it worked. No idea why.

Re: FAQ: "You are not authorized to view this resource. You need to login."

Posted: Thu Nov 29, 2007 9:53 pm
by curtdp
draden wrote:Another quick fix I didn't notice mentioned here that fixed the issue for me was an issue with my server time. When I would create static content the publish time and date were in the future because the time was set different. So simply creating a piece of static content and making the publish date the day before, I don't get the issue anymore.

Hope that helps!


I tried this on my site, it does! :) Thanks for the great tips!

Re: Tips: "You are not authorized to view this resource. You need to login."

Posted: Wed Dec 19, 2007 10:51 pm
by karryberry
you could also make the content static which will have the same effect.

Re: Tips: "You are not authorized to view this resource. You need to login."

Posted: Mon Jan 21, 2008 11:55 am
by agassem
Thank you for posting, very helpful.

It seems that I fix problem by clearing cache!, but problem of happens again:

When new content is submitted on front-end, get same problem again "You are not authorised to view this resource.
You need to login."

I am using SEF component "sh404SEF".  How can I fix problem once and for all  ;D

Cheers, Abbas

Re: Tips: "You are not authorized to view this resource. You need to login."

Posted: Mon Jan 28, 2008 4:23 pm
by kstray
My development server was in a different time zone as the live site. The live site was 8 hrs behind.... so when dumped and imported the DB some items were not published yet ;)

Re: Tips: "You are not authorized to view this resource. You need to login."

Posted: Fri Feb 08, 2008 9:17 pm
by fedster
Is there a way to overide the error message with the login page? 

what I'm trying to do is instead of getting that error (wich I'm getting intentianlly, cuase I have a menu that points to a registed only article) I don't want to show the message I want to redirect them to the login/registration form.

A quick and dirty workaround was to change the _NOT_AUTH token on the languages files to a message with a link to the login page. but I want to avoid that extra step and do that automaticaly.


Thanks for any help