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

A forum with Tips, tricks and small tutorials.

Moderators: mcsmom, unixboymd

Forum rules
Post Reply
User avatar
rsphaeroides
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Sun Aug 21, 2005 2:57 pm
Location: Colorado, USA
Contact:

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

Post by rsphaeroides » Fri Nov 18, 2005 8:15 pm

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…)
Attachments
NotAuthorized_MenuLink.png
NotAuthorized_Published.png
Last edited by mcsmom on Mon Oct 01, 2007 2:22 am, edited 1 time in total.
¡Pura Vida!
Ray,
joomla in testing at Costa Rica Travel: http://costaricamap.net
http://costa-rica-guide.com

draden

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

Post by draden » Wed Feb 15, 2006 3:41 am

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!

User avatar
guilliam
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 159
Joined: Thu Aug 18, 2005 10:27 am
Location: Sunny City Cebu, Philippines!
Contact:

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

Post by guilliam » Thu Mar 02, 2006 4:13 pm

MOD NOTE: All Discussion on this thread can be done HERE:

http://forum.joomla.org/index.php/topic,42648.0.html
"I was one of those who wondered why people would pay so much $$$$ to do something that was so much fun!" -R. Harkrider, Fortran Code Engr.
^If u read that in $GREEN, you clearly missed the HIGHLIGHTS!
http://www.joomlancers.com | http://www.joomlaconsultancy.net

User avatar
publipoint
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Oct 19, 2007 7:34 am
Location: Switzerland
Contact:

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

Post by publipoint » Tue Nov 20, 2007 1:08 pm

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.
Last edited by publipoint on Tue Nov 20, 2007 1:15 pm, edited 1 time in total.
Michele Bugliaro Goggia
designer SUP in visual communication
http://www.publipoint.ch

curtdp

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

Post by curtdp » Thu Nov 29, 2007 9:53 pm

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!

karryberry
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Dec 19, 2007 10:36 pm

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

Post by karryberry » Wed Dec 19, 2007 10:51 pm

you could also make the content static which will have the same effect.
smile

agassem
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Oct 13, 2007 1:49 pm

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

Post by agassem » Mon Jan 21, 2008 11:55 am

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

kstray

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

Post by kstray » Mon Jan 28, 2008 4:23 pm

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 ;)

fedster

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

Post by fedster » Fri Feb 08, 2008 9:17 pm

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


Post Reply