Joomla 2.5 Template - Custom Security Group and Article Access Problem |
|
Brandt Cramer
|
Hi there,
I have a Joomla 2.5.9 installation, upgraded from 1.5 originally. Prior to 2.5.9 we did not use any kind of custom security groups for article access. Now we have started to use custom security groups for article access.
So here is the problem. Created a group called "Paid" and assigned article security to this group. Menu items pointing to these articles are still "Public" set (I want the registered user to see the menu item to know there is something there). If I have a user that is a part of the "Registered" group, but NOT in the "Paid" group they get this error:
Quote :Fatal error: Call to a member function get() on a non-object in /home/content/72/7060172/html/thetwinpowers/en/templates/thetwinpowersv6/library/Artx/Content/SingleArticle.php on line 51
And the Code is:
$this->categoryLink = $this->_articleParams->get('link_category') && $this->_article->catslug
Funny part is if you try and access the article directly without Login, you get the proper Access Denied Page:
Quote :You are not authorised to view this resource.
If you put the user in the "Paid" group, they can get the article just fine.
If I switch back to the Joomla 2.5 Default Atomic Template, I don't get an error, just a blank article (not the Access Denied Page an unauthorized user wourld get).
I posted this on the Joomla site, but have had no responses: http://forum.joomla.org/viewtopic.php?f=673&t=797499&p=3017812#p3017812
I tried searching with Google for a solution, but couldn't find anything. It has been 3 weeks of work now to try and fix this bug, with no avail. I now can see it is related to my template, but am unsure why.
Artiseer Version: 4.0.0.58475 Standard Edition
|
|
Mark Bennett
|
Go to /components/com_content/views/article/view.html.php
Search for JError::raiseWarning(403
JError::raiseWarning(403, JText::_('JERROR_ALERTNOAUTHOR'));
return;
}
replace with
//JError::raiseWarning(403, JText::_('JERROR_ALERTNOAUTHOR'));
$referer= $_SERVER['REQUEST_URI'];
$app->redirect(JRoute::_('index.php?option=com_users&view=login&return='. base64_encode($referer)));
return;
}
|
|
|
|