Get error explaining I'm not authorized to access the article since I'm not logged in.
Get redirected to the site's homepage.
Database: 5.5.40-0ubuntu0.14.04.1
PHP: 5.5.9-1ubuntu4.4
Joomla version: Joomla! 3.3.6 Stable
Joomla platform version: Joomla Platform 13.1.0 Stable
User Agent: Mozilla/5.0 Firefox/33.0
Make sure to use an incognito/private browsing window to ensure that neither cookies nor the cache will affect the testing.
If you try accessing the article without ever having logged in, you'll get what was described in the "Expected result" section, so it's the logging in that's causing this behaviour after logging out.
Labels |
Added:
?
|
Category | ⇒ | Authentication Multilanguage |
Turns out this isn't multilingual dependant. Same bug happens on a regular site.
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4934.
@infograf768 Could you confirm it happens on non-multilingual sites? I just edited the issue and added a comment (I had edited it on github, but it seems this issue tracker overrides the one on github, so I had to make the edit again).
@brianteeman Maybe we should remove the multilanguage tag? Sorry about that.
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4934.
Works fine when I test it with Chrome. I get an error
Error
You are not authorised to view this resource.
On IE11 I get redirected to the homepage. Even after loggin in again I can't access the article.
Same behavior on Firefox.
That's really strange imho.
(I had edited it on github, but it seems this issue tracker overrides the one on github, so I had to make the edit again).
If you make an edit on GitHub, it doesn't update JIssues. But as soon as someone makes a new comment, your edit will be updated on JIssues as well. I think it has to do with the way the GitHub API works.
Category | Authentication Multilanguage | ⇒ | Authentication |
Ya, the API doesn't send out data on edited items anymore.
Firefox Macintosh: Redirects to FrontPage
Message**
**You have been redirected to the home page following logout**
Looks like we consider that error here as a 403, so instead of redirecting to the real message handleError(&$error) in the logout system plugin redirects to home page
debug shows:
object(JException)[541]
protected 'level' => int 2
protected 'code' => int 403
protected 'message' => string '**You are not authorised to view this resource.**' (length=49)
protected 'info' => string '' (length=0)
protected 'file' => string '/Applications/MAMP/htdocs/trunkgitnew/libraries/legacy/error/error.php' (length=70)
protected 'line' => int 177
protected 'function' => null
protected 'class' => null
protected 'type' => null
protected 'args' =>
The only solution I found is to change the code inROOT/components/com_content/views/article/view.html.php
to
// Check the view access to the article (the model has already computed the values).
if ($item->params->get('access-view') == false && ($item->params->get('show_noauth', '0') == '0'))
{
$app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'warning');
return;
}
As far as I know the handleError(&$error)
method in that plugin is the only place in core using a conditional checking for a 403
// Make sure the error is a 403 and we are in the frontend.
if ($error->getCode() == 403 and $app->isSite())
{
I looked at the original code (in 2010)
the 403 specific error and redirect was intended when logging out while editing an article.
Status | New | ⇒ | Confirmed |
Closing as we have a PR by @clinchergt here: #5019 Thanks
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-05-08 22:15:10 |
Closed_By | ⇒ | zero-24 |
I confirm this behaviour.
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4934.