Keyword

Error message 403 - K2_ALERTNOTAUTH

More
12 years 10 months ago #59100 by Fio
Replied by Fio on topic Re: Error message 403 - K2_ALERTNOTAUTH

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.

More
12 years 6 months ago #59101 by Thomas
Replied by Thomas on topic Re: Error message 403 - K2_ALERTNOTAUTH

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.

More
12 years 5 months ago #59102 by Eoin Feeney
Replied by Eoin Feeney on topic Re: Error message 403 - K2_ALERTNOTAUTH
I'm using K2, and Sourcecoast Joomla Connect. I'm using the later to create my Facebook Tab, and it is there that I have found this problem. Hence, I really, really, reallllly don't want to make user permissions editable.

Is there another solution in my instance?

Please Log in or Create an account to join the conversation.

More
12 years 5 months ago #59103 by Eoin Feeney
Replied by Eoin Feeney on topic Re: Error message 403 - K2_ALERTNOTAUTH
This problem occurred for me when I published a "public" article to my frontpage by accident. I unpublished the article and all of the K2 items started working again (hurruh).

Please Log in or Create an account to join the conversation.

More
12 years 2 months ago #59104 by Arvind Ragunathan
Replied by Arvind Ragunathan on topic Re: Error message 403 - K2_ALERTNOTAUTH
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();
}

}
}

Please Log in or Create an account to join the conversation.

More
12 years 2 weeks ago #59105 by mohamed
Replied by mohamed on topic Re: Error message 403 - K2_ALERTNOTAUTH

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


}

Hi
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.

More
11 years 9 months ago #59106 by marieta
Replied by marieta on topic Re: Error message 403 - K2_ALERTNOTAUTH

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.


Powered by Kunena Forum