News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

You are not authorized to view this resource - solved

Started by SpikeyKlitske, July 20, 2005, 07:42:31 AM

Previous topic - Next topic

SpikeyKlitske

Hi,

I have searched the forum for this error and tried the various options proposed. Still it doesnt work for me.

I managed to recreate the error that some of our users are having. This all started when I introduced a new board and was trying out various permission settings whilst the forum was active and members already started viewing and posting in it. Here is what happends:

I created a new board with local permissions only accessible by a specific usergroup.
I created a new account, activated it and all works fine. I added this new member to the specific usergroup , all still works fine. User can now view and submitt posts to the new board.

I then make this user an ordinary aka removed him from the specific usergroup and then the problem starts:  "You are not authorized to view this resource". Also the user gets a redirect to the forum as follows: http://www.bs-clanbase.com/index.php?option=com_smf&Itemid=56&action=mambo_login;sa=check;id=235 [nofollow]

This dreadfull message is displayed each time the user logs in or wants to post edit or reply to any message including karma.

Adding this user to the usergroup again want make any difference anymore, deleting the account and adding same account again wont help either. I explored all admin tools available to the forum, aka recounting stats, deleting logs, cache history whatever, nothing makes any difference.

I am at a total loss and need to find a solution please, any help is much appreciated.

you can visit our site: www.bs-clanbase.com [nofollow] and use the test account i created " test2"  password "test2"

-edit- the specific usergroup is «·ß§·» Negotiator and new board is Clan Negotiator a child of Clan Help

Fizzy

"Reality is merely an illusion, albeit a very persistent one." - A.E.


SpikeyKlitske

Yes i can delete the amp; but it still doesnt help me. I can also simply click on home and registration seems all fine until you go and post or edit any of your previous posts the same error shows up again. The posts will go through but the error is displayed any time this users creates or alters a message, topic anything that normally requires authorization to do so.

Aravot

I have the exact same problem, if you find a solution let me know.

Orstio

#4
Disregard

Aravot

Quote from: Orstio on July 20, 2005, 05:54:47 PM
On line 21 of mod_smf_login.php, change this:

$myurl = $mosConfig_live_site ."/". basename($_SERVER['PHP_SELF'])."?option=com_smf&Itemid=" . $row[0]."&";


to this:

$myurl = $mosConfig_live_site ."/". basename($_SERVER['PHP_SELF'])."?option=com_smf&Itemid=" . $row[0]."&";



No change same result as before
Your page will not validate as XHTML, but it will work.

Orstio

Thanks for the link Aravot.

I now see that the problem is happening after the user is logged in, so it is the redirectexit() that is doing it.

Let me know if the change I suggested by PM works.

Orstio

In MOS_SMF.php, find this line:

redirectexit('action=mambo_login;sa=check;id=' . $ID_MEMBER);


and change it to this:

redirectexit($mosConfig_live_site.'/'.basename($_SERVER['PHP_SELF']).'?option=com_smf&;&Itemid='.$_REQUEST['Itemid'].'&action=mambo_login;sa=check;id=' . $ID_MEMBER, false);



SpikeyKlitske

#8
Thank you for your assistance.

I tried both options offered by Orstio, none of them showed any different result. The change I am getting is that the link in the redirect changed to this:
http://www.bs-clanbase.com/index.php?option=com_smf&Itemid=56& [nofollow]

-edit- The error message changed a little too the line "you need to login"  is added

Aravot

The 'You are not authorized to view this resource' error message it back, well it seems it wasn't been fixed completely.

When a user posts a message in the forum the 'You are not ...' message appears, but the message it posted.

SpikeyKlitske

#10
as a result of my efforts this is continuoesly reported in our error log :

PHP Fatal error:  Call to a member function on a non-object in /home/....../.....l/includes/mambo.php on line 464

Either i made an error whilst trying to correct the file to its original state or something else is causing it dunno.

SpikeyKlitske

#11
The solution to this problem is in the file components/com_smf/smf.php

change this line
$myurl = $GLOBALS['mosConfig_live_site'] . '/' . basename($_SERVER['PHP_SELF']) . '?option=com_smf&Itemid=' . $GLOBALS['Itemid']. '&';

and replace it with this line
$myurl = $GLOBALS['mosConfig_live_site'] . '/' . basename($_SERVER['PHP_SELF']) . '?option=com_smf&Itemid=' . $GLOBALS['Itemid']. '&';

also change this line
$myurl = $GLOBALS['mosConfig_live_site'] . '/' . basename($_SERVER['PHP_SELF']) . '?option=com_smf&Itemid=' . $GLOBALS['Itemid'] . '&';

and replace with this line
$myurl = $GLOBALS['mosConfig_live_site'] . '/' . basename($_SERVER['PHP_SELF']) . '?option=com_smf&Itemid=' . $GLOBALS['Itemid'] . '&;';

and your members are all happy again.

Yes you have to change it twice and it are rows 61 and 115 :) The other changes mentioned earlier did not make a difference i nmy case but modding the smf.php file did.

Aravot


SpikeyKlitske


MrWoof

Quote from: SpikeyKlitske on August 01, 2005, 11:26:22 AM
The solution to this problem is in the file components/com_smf/smf.php

Yes you have to change it twice and it are rows 61 and 115 :) The other changes mentioned earlier did not make a difference i nmy case but modding the smf.php file did.
this solution worked great except there's one problem that popped up.

the mod_smf_RecentTopics forgets to include the Itemid.  Before fixing the &amp; it worked fine.  So to fix one problem, created another.  The URL is now http://www.realityhq.com/index.php?option=com_smf&Itemid=&?board=12.0 <- missing Itemid (see more examples at www.realityhq.com and hover your mouse over one of the recent topics).

The error only appears when someone replies or adds a new topic.  The error I receive is

Notice: Undefined index: Itemid in /home2/mlsantos/public_html/forum/index.php on line 79


I'm not a coder, so I'm not sure where to fix this.  Any help?

Thanks.
Are you a reality tv fan? Visit Reality HQ today to get your latest dose!

Orstio

Quotethe mod_smf_RecentTopics forgets to include the Itemid.  Before fixing the &amp; it worked fine.  So to fix one problem, created another.  The URL is now http://www.realityhq.com/index.php?option=com_smf&Itemid=&?board=12.0 <- missing Itemid (see more examples at www.realityhq.com and hover your mouse over one of the recent topics).

It is not "forgetting" it.  You deleted the main menu link to the forum, which means that it simply cannot find it.

You can unpublish the link in the main menu, but you cannot delete it.

MrWoof

Are you a reality tv fan? Visit Reality HQ today to get your latest dose!

Advertisement: