Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Access denied - you do not have permission
Avatar
Dave
Member
sp_UserOfflineSmall Offline
Nov 10, 2014 - 4:22 am

I have one user, which is a moderator, reporting this issue and I can repeat it when logged in as that user. It does not happen when logged in as an admin from my personal experience and no one else has reported the problem.

Whenever the user attempts to reply to a topic the "post saved" modal appears then as the page reloads to show the post with the new reply the following error is displayed:

Access denied - you do not have permission

Warning: Cannot modify header information - headers already sent by (output started at /problem-with-post-edit-buttonome/XXXXXX/public_html/wp-content/plugins/simple-press/sp-api/sp-api-primitives.php:59) in /problem-with-post-edit-buttonome/XXXXXX/public_html/wp-includes/pluggable.php on line 1173

Here are the relevant error log entries:

November 10, 2014 3:52 am | spaErrWarning | 1 | phpfile: /simple-press/sp-api/sp-api-plugins.php

line: 758

function: fread

Warning | fread(): Length parameter must be greater than 0

November 10, 2014 3:52 am | spaErrWarning | 1 | phpfile: /simple-press/sp-api/sp-api-plugins.php

line: 588

function: fread

Warning | fread(): Length parameter must be greater than 0

November 10, 2014 4:13 am | spaErrNotice | 2 | phpfile: /simple-press/sp-startup/admin/spa-admin-framework.php

line: 401

function: spa_check_warnings

Notice | Undefined index: active

November 10, 2014 3:54 am | spaErrNotice | 3 | phpfile: rtsock/public_html/wp-content/sp-resources/forum-plugins/admin-bar/library/sp-admin-bar-components.php

line: 15

function: sp_admin_bar_do_new_post_list

Notice | Undefined property: spUser::$sfadminbar

November 5, 2014 9:34 pm | spaErrNotice | 1 | phpfile: /simple-press/forum/profile/forms/sp-form-profile.php

line: 109

function: include_once

Notice | Undefined property: spUser::$location

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Nov 10, 2014 - 4:50 am

Let's start by doing something obvious! 

Go to the forum admin > Toolbox > Housekeeping and click on the task to 'Reset Auths Cache' in case all this is just the one user with scrambled permissions. Get your moderator to see if that shifts anything.

None of the entries there in the log are actual errors as you can see and for at least ine of them I can not locate the line of code being referenced. What version of SP is this?

However - one of those entries is a little worrying. Can you go to the forum admin > Options > Global Settings and turn OFF the two options in the 'CSS/JS Combined Caching' section. Let's leave them off until we sort the user issue.

Finally - after the cache reset can you also clear the error log so we can see what gets reported when your moderator gives it a try.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Dave
Member
sp_UserOfflineSmall Offline
Nov 10, 2014 - 4:58 am

That didn't work. Something interesting is that the user can create a new topic, just not reply to one created by someone else.

Edit - forgot to add error log information:
November 10, 2014 4:59 am | spaErrNotice | 1 | phpfile: /simple-press/sp-startup/admin/spa-admin-framework.php
line: 401
function: spa_check_warnings
Notice | Undefined index: active
November 10, 2014 4:59 am | spaErrNotice | 30 | phpfile: /simple-press/sp-api/sp-api-auths.php
line: 32
function: sp_get_auth
Notice | Undefined offset: 18

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Nov 10, 2014 - 5:02 am

And what was in the log after you cleared it and tried with the user account again?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Dave
Member
sp_UserOfflineSmall Offline
Nov 10, 2014 - 5:36 am

We must have crossed paths as I was editing my previous post to add the errors. :)

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Nov 10, 2014 - 6:12 am

Sorry - and the other question I asked as well... what version please?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Dave
Member
sp_UserOfflineSmall Offline
Nov 10, 2014 - 6:36 am

Wow, I'm really screwing up today. Sorry to waste your time because I'm overlooking questions!

Simple:Press
Version: 5.5.2
Build: 12017

WordPress
Version: 4.0

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Nov 10, 2014 - 8:35 am

I am struggling with the option of your moderator not being able to reply and I doubt the notices you are seeing in the error log have any bearing on this but let's see about getting rid of them to test what happens. So...

Can you please go to the forum admin > themes > mobile tablet theme. There appears to be some confusion over whether you have a theme selected for tablets or not. If you DO have it enabled, could you select a different theme - save it and then reselect the one you want and update again. Also click on the update button in the top section just to refresh the data.

Next - forum admin > permissions and select the permission set your moderator's access is assigned to (may be more than one) and (a) ensure the options are set correctly and (b) change something and update... (c) change ot back again and update. Again - this is just to ensure the data is refreshed.

And let's see if those entries disappear. You will need to clear the error log before testing.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Dave
Member
sp_UserOfflineSmall Offline
Nov 10, 2014 - 9:04 am

Table theme was not enabled, but I've enabled it and selected a theme.
User is only a member of the Moderators group, which has been updated.
Error log cleared and error persists.

November 10, 2014 9:02 am | spaErrNotice | 14 | phpfile: /simple-press/sp-api/sp-api-auths.php
line: 32
function: sp_get_auth
Notice | Undefined offset: 18

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Nov 10, 2014 - 10:50 am

While still unconvinced that this notice has anything to do with your moderator's problems I am keen to try and track it down so it is a good place to start.

Can you do something for me please...

Go to the forum admin > toolbox > data inspector and turn on the option to show 'spGlobals' in the Control Data section. 

Now run a front-end forum page - any view should do. Do NOT be alarmed at the display. You are the only user who will be getting to see all of this!

Way, way down the dump of values you will find an array called 'auths-map'. Can you tell me what is displayed at index position 18 please?

Then below the auths-map list there is an 'auths' section for each individual permission. perhaops you cou;d also tell me what it shows for position 18.

Then you may want to turn the inspection of spGlobals off again!

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625