- Posts: 2
COMMUNITY FORUM
Error message 403 - K2_ALERTNOTAUTH
- Jeremy Dyer
-
Topic Author
- Offline
- New Member
Does anyone know how to deal with this error message please?
403 - K2_ALERTNOTAUTH
I am using Joomla 1.7 and K2 v2.5.1
I want to keep most of my site available only to registered users. I am using Frontpage Slideshow on the first page. If users click on a menu item that links to a registered user only item I would like them to be redirected to the login page, but instead I get this message 403 - K2_ALERTNOTAUTH.
Many thanks
Please Log in or Create an account to join the conversation.
- Salvatore Satta
-
- Offline
- New Member
- Posts: 1
please help us!
Please Log in or Create an account to join the conversation.
- Ivo Apostolov
-
- Offline
- Senior Member
- Posts: 62
Please Log in or Create an account to join the conversation.
- Jeremy Dyer
-
Topic Author
- Offline
- New Member
- Posts: 2
Anyone else?
Please Log in or Create an account to join the conversation.
- AM Development
-
- Offline
- New Member
- Posts: 1
In preliminary testing it appears that defining the category access level will apply to children by default - though you can change an individual item to a different access level.
I had the same problem, but was able to figure this out quickly as I was on a live server.
Hope that helps.
Adreck
Please Log in or Create an account to join the conversation.
- Brat
-
- Offline
- New Member
- Posts: 7
AM Development wrote: It appears, whether intentional or not - you need to make sure all K2 categories and items have a defined access level appropriate for the audience.
In preliminary testing it appears that defining the category access level will apply to children by default - though you can change an individual item to a different access level.
I had the same problem, but was able to figure this out quickly as I was on a live server.
Hope that helps.
Adreck
I've tried this, and I do concur - this appears to be the fix for this particular problem. You must make sure that your members have the correct privileges. In my case, I created a special K2 usergroup for fiction writers and enabled create, edit and publish. This did the trick.
Please Log in or Create an account to join the conversation.
- Kiriaki Iven
-
- Offline
- New Member
- Posts: 4
Please Log in or Create an account to join the conversation.
- Ricardo Merino
-
- Offline
- New Member
- Posts: 1
Please Log in or Create an account to join the conversation.
- Fio
-
- Offline
- New Member
- Posts: 2
When u click on it from the front end it pops up a new window with 403 - K2_ALERTNOTAUTH title.
Same thing on localhost and on the hosting. The suggestions here abot making the category permissions did not work (its on public). Also the 403 appears by clicking on that link even if I am logged in as Administrator to thr frontend.
Doesn't seem to be normal imho, please advise.
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
BTW, in k2 v2.5.3 we have fixed this missing language string.
Please Log in or Create an account to join the conversation.
- Fio
-
- Offline
- New Member
- Posts: 2
Fotis Evangelou wrote: Guys, you need to create K2 user groups first with the editing permissions you want and assign users there. That's why you get this message.
BTW, in k2 v2.5.3 we have fixed this missing language string.
Ok just installed the 2.5.3, indeed the string is fixed. About creating user groups: what if I want unregistered users to submit content like articles or articles with attached documents and such? Is it even possible (coz in sobi2 it is)? I prefer using your component over sobi2coz its more uptodate and has more features..
Thanks
Please Log in or Create an account to join the conversation.
- Thomas
-
- Offline
- New Member
- Posts: 4
Fotis Evangelou wrote: Guys, you need to create K2 user groups first with the editing permissions you want and assign users there. That's why you get this message.
BTW, in k2 v2.5.3 we have fixed this missing language string.
Is it possible, that unregistered users submit content?
I have tried a lot of ACL Settings, but doesn´t find a solution for this:-(
Please Log in or Create an account to join the conversation.
- Eoin Feeney
-
- Offline
- Premium Member
- Posts: 99
Is there another solution in my instance?
Please Log in or Create an account to join the conversation.
- Eoin Feeney
-
- Offline
- Premium Member
- Posts: 99
Please Log in or Create an account to join the conversation.
- Arvind Ragunathan
-
- Offline
- New Member
- Posts: 4
I am using Joomla v2.5.6 and K2 v2.5.7
If your K2 category is set to registered and you have assigned a menu item to the registered category then you will receive "403 - You are not authorized to view this resource"
To resolve this issue we need to manually change the code on the backend.
1) Go To [SITE ROOT]\components\com_k2\views\itemlist\view.html.php
2) Find the code "JError::raiseError(403, JText::_('K2_ALERTNOTAUTH'));" which is contained in
$user = &JFactory::getUser();
if(K2_JVERSION=='16'){
if (!in_array($category->access, $user->authorisedLevels())) {
JError::raiseError(403, JText::_('K2_ALERTNOTAUTH'));
}
$languageFilter = $mainframe->getLanguageFilter();
$languageTag = JFactory::getLanguage()->getTag();
if($languageFilter && $category->language!=$languageTag && $category->language!='*') {
return;
}
}
3) Replace the code "JError::raiseError(403, JText::_('K2_ALERTNOTAUTH'));" with:
if ($this->error->code = '403') {
$return = $_SERVER;
$return = base64_encode($return);
$uri = JRoute::_("index.php?option=com_users&view=login&return=$return");
header('Location:'.$uri); die();
}
4) Final code should look like:
$user = &JFactory::getUser();
if(K2_JVERSION=='16'){
if (!in_array($category->access, $user->authorisedLevels())) {
/*JError::raiseError(403, JText::_('K2_ALERTNOTAUTH'));*/
if ($this->error->code = '403') {
$return = $_SERVER;
$return = base64_encode($return);
$uri = JRoute::_("index.php?option=com_users&view=login&return=$return");
header('Location:'.$uri); die();
}
}
$languageFilter = $mainframe->getLanguageFilter();
$languageTag = JFactory::getLanguage()->getTag();
if($languageFilter && $category->language!=$languageTag && $category->language!='*') {
return;
}
}
5) This should resolve the issue.
6) You can do the same for [SITE ROOT]\components\com_k2\views\item\view.html.php
7) Find the code "JError::raiseError(403, JText::_('K2_ALERTNOTAUTH'));" which is contained in
if(K2_JVERSION=='16'){
if (!in_array($item->access, $user->authorisedLevels()) || !in_array($item->category->access, $user->authorisedLevels())) {
JError::raiseError(403, JText::_('K2_ALERTNOTAUTH'));
}
}
8 Replace the code "JError::raiseError(403, JText::_('K2_ALERTNOTAUTH'));" with:
if ($this->error->code = '403') {
$return = $_SERVER;
$return = base64_encode($return);
$uri = JRoute::_("index.php?option=com_users&view=login&return=$return");
header('Location:'.$uri); die();
}
9) Final code should look like:
if(K2_JVERSION=='16'){
if (!in_array($item->access, $user->authorisedLevels()) || !in_array($item->category->access, $user->authorisedLevels())) {
/*JError::raiseError(403, JText::_('K2_ALERTNOTAUTH'));*/
if ($this->error->code = '403') {
$return = $_SERVER;
$return = base64_encode($return);
$uri = JRoute::_("index.php?option=com_users&view=login&return=$return");
header('Location:'.$uri); die();
}
}
}
Please Log in or Create an account to join the conversation.
- mohamed
-
- Offline
- New Member
- Posts: 1
HiArvind Ragunathan wrote: You can try this:
I am using Joomla v2.5.6 and K2 v2.5.7
If your K2 category is set to registered and you have assigned a menu item to the registered category then you will receive "403 - You are not authorized to view this resource"
To resolve this issue we need to manually change the code on the backend.
1) Go To [SITE ROOT]\components\com_k2\views\itemlist\view.html.php
}
i have the same problem
joomla 1.7.2 and k2 v2.5.7
replacing codes in this files did not work
i searched for the error text string and found that changes make effect when done to this file only
components/com_k2/helpers/permissions.php
but i can not configure the exact code to change
line number 109
$task = JRequest::getCmd('task');
switch ($task) {
case 'add':
if (!K2HelperPermissions::canAddItem())
JError::raiseError(403, JText::_('K2_ALERTNOTAUTH'));
break;
Please Log in or Create an account to join the conversation.
- marieta
-
- Offline
- New Member
- Posts: 1
Arvind Ragunathan wrote: You can try this:
I am using Joomla v2.5.6 and K2 v2.5.7
If your K2 category is set to registered and you have assigned a menu item to the registered category then you will receive "403 - You are not authorized to view this resource"
To resolve this issue we need to manually change the code on the backend.
1) Go To [SITE ROOT]\components\com_k2\views\itemlist\view.html.php
2) Find the code "JError::raiseError(403, JText::_('K2_ALERTNOTAUTH'));" which is contained in
$user = &JFactory::getUser();
if(K2_JVERSION=='16'){
if (!in_array($category->access, $user->authorisedLevels())) {
JError::raiseError(403, JText::_('K2_ALERTNOTAUTH'));
}
$languageFilter = $mainframe->getLanguageFilter();
$languageTag = JFactory::getLanguage()->getTag();
if($languageFilter && $category->language!=$languageTag && $category->language!='*') {
return;
}
}
3) Replace the code "JError::raiseError(403, JText::_('K2_ALERTNOTAUTH'));" with:
if ($this->error->code = '403') {
$return = $_SERVER;
$return = base64_encode($return);
$uri = JRoute::_("index.php?option=com_users&view=login&return=$return");
header('Location:'.$uri); die();
}
4) Final code should look like:
$user = &JFactory::getUser();
if(K2_JVERSION=='16'){
if (!in_array($category->access, $user->authorisedLevels())) {
/*JError::raiseError(403, JText::_('K2_ALERTNOTAUTH'));*/
if ($this->error->code = '403') {
$return = $_SERVER;
$return = base64_encode($return);
$uri = JRoute::_("index.php?option=com_users&view=login&return=$return");
header('Location:'.$uri); die();
}
}
$languageFilter = $mainframe->getLanguageFilter();
$languageTag = JFactory::getLanguage()->getTag();
if($languageFilter && $category->language!=$languageTag && $category->language!='*') {
return;
}
}
5) This should resolve the issue.
6) You can do the same for [SITE ROOT]\components\com_k2\views\item\view.html.php
7) Find the code "JError::raiseError(403, JText::_('K2_ALERTNOTAUTH'));" which is contained in
if(K2_JVERSION=='16'){
if (!in_array($item->access, $user->authorisedLevels()) || !in_array($item->category->access, $user->authorisedLevels())) {
JError::raiseError(403, JText::_('K2_ALERTNOTAUTH'));
}
}
8 Replace the code "JError::raiseError(403, JText::_('K2_ALERTNOTAUTH'));" with:
if ($this->error->code = '403') {
$return = $_SERVER;
$return = base64_encode($return);
$uri = JRoute::_("index.php?option=com_users&view=login&return=$return");
header('Location:'.$uri); die();
}
9) Final code should look like:
if(K2_JVERSION=='16'){
if (!in_array($item->access, $user->authorisedLevels()) || !in_array($item->category->access, $user->authorisedLevels())) {
/*JError::raiseError(403, JText::_('K2_ALERTNOTAUTH'));*/
if ($this->error->code = '403') {
$return = $_SERVER;
$return = base64_encode($return);
$uri = JRoute::_("index.php?option=com_users&view=login&return=$return");
header('Location:'.$uri); die();
}
}
}
i didn't find this code!!!!
some one have another solution??
Please Log in or Create an account to join the conversation.