Keyword

Error message 403 - K2_ALERTNOTAUTH

  • Jeremy Dyer
  • Jeremy Dyer's Avatar Topic Author
  • Offline
  • New Member
More
13 years 6 months ago #59090 by Jeremy Dyer
Error message 403 - K2_ALERTNOTAUTH was created by Jeremy Dyer
Hello

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.

More
13 years 6 months ago #59091 by Salvatore Satta
Replied by Salvatore Satta on topic Re: Error message 403 - K2_ALERTNOTAUTH
i have almost the same error (the error message appear when i want to insert an item from frontend)
please help us!

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

More
13 years 6 months ago #59092 by Ivo Apostolov
Replied by Ivo Apostolov on topic Re: Error message 403 - K2_ALERTNOTAUTH
There is no easy solution for that one. If I was you, I would overwrite the module view and if the item displayed has "registered" access, will load a login form via some JavaScript. However, as I said, it is not that easy job to do.

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

  • Jeremy Dyer
  • Jeremy Dyer's Avatar Topic Author
  • Offline
  • New Member
More
13 years 6 months ago #59093 by Jeremy Dyer
Replied by Jeremy Dyer on topic Re: Error message 403 - K2_ALERTNOTAUTH
Thanks Ivo, but that's beyond my abilities.

Anyone else?

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

More
13 years 6 months ago #59094 by AM Development
Replied by AM Development on topic Re: Error message 403 - K2_ALERTNOTAUTH
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

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

More
13 years 6 months ago #59095 by Brat
Replied by Brat on topic Re: Error message 403 - K2_ALERTNOTAUTH

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.

More
13 years 6 months ago #59096 by Kiriaki Iven
Replied by Kiriaki Iven on topic Re: Error message 403 - K2_ALERTNOTAUTH
Do you use cache or compress? If you do make sure that the file k2.js is excluded from cache.

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

More
13 years 5 months ago #59097 by Ricardo Merino
Replied by Ricardo Merino on topic Re: Error message 403 - K2_ALERTNOTAUTH
I have the same problem, help please.

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

More
13 years 5 months ago #59098 by Fio
Replied by Fio on topic Re: Error message 403 - K2_ALERTNOTAUTH
Hello, I have the same problem on joomla 1.5. Its fresh install of joomla and K2 latest version. I want unregistered users to post articles, so I made menu Item "Item edit form" from joomla add new menu item.
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.

More
13 years 5 months ago #59099 by JoomlaWorks
Replied by JoomlaWorks on topic Re: Error message 403 - K2_ALERTNOTAUTH
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.

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

More
13 years 5 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
13 years 2 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
13 years 1 month 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
13 years 1 week 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 9 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 8 months 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
12 years 5 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