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
Members not able to delete own posts
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 13, 2013 - 10:21 am

well, I cannot replicate any problem like that...  same problem before the change, but fixed after... and the only way to get that message is if this check failed:

    if (sp_get_auth('delete_any_post', $forumid) || (sp_get_auth('delete_own_posts', $forumid) && $spThisUser->ID == $poster)) {

which is a permission check and making sure the post they are deleting is their own...  so please recheck the code change... and guess you could try resetting the auths cache on forum - toolbox - housekeeping...

Avatar
Meztli
Sweden
Member
sp_UserOfflineSmall Offline
Oct 13, 2013 - 12:50 pm

Mr Papa said
well, I cannot replicate any problem like that...  same problem before the change, but fixed after... and the only way to get that message is if this check failed:

    if (sp_get_auth('delete_any_post', $forumid) || (sp_get_auth('delete_own_posts', $forumid) && $spThisUser->ID == $poster)) {

which is a permission check and making sure the post they are deleting is their own...  so please recheck the code change... and guess you could try resetting the auths cache on forum - toolbox - housekeeping...

Hi Steve,

In what file do i find above code string?

Did try to reset the auths chache, but it did not help.

 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 13, 2013 - 4:33 pm

as stated in post #9, its simple-press/forum/content/ahah/sp-ahah-admintoollinks.php

Avatar
Meztli
Sweden
Member
sp_UserOfflineSmall Offline
Oct 14, 2013 - 4:29 am

Mr Papa said
as stated in post #9, its simple-press/forum/content/ahah/sp-ahah-admintoollinks.php

Sorry, did not understand that you where refering to the same php file.

 

Avatar
Meztli
Sweden
Member
sp_UserOfflineSmall Offline
Oct 14, 2013 - 4:40 am

Mr Papa said

    if (sp_get_auth('delete_any_post', $forumid) || (sp_get_auth('delete_own_posts', $forumid) && $spThisUser->ID == $poster)) {

Hi Steve,

My sp-ahah-admintoollinks.php looks a bit different from the code you posted above, but i am not skilled enough to judge if something is wrong or not.

if (sp_get_auth('delete_any_post', $post['forum_id']) || sp_get_auth('delete_own_posts', $forum['forum_id']) && $spThisUser->ID == $post['user_id']) {

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 14, 2013 - 9:47 am

well thats why I said AROUND line 137, find this line:

        $ajaxUrl = SFHOMEURL.'index.php?sp_ahah=admintools&sfnonce='.wp_create_nonce('forum-ahah').'&action=delete-post&killpost='.$post['post_id'].'&killposttopic='.$post['topic_id'].'&killpostforum='.$post['forum_id'].'&killpostpopster='.$post['user_id'].'&page='.$page;

because of version differences...  its about 4 lines of code lower than the one you referenced...

in that line, you would change killpostpopster to killpostposter

Avatar
Meztli
Sweden
Member
sp_UserOfflineSmall Offline
Oct 14, 2013 - 10:18 am

Mr Papa said
well thats why I said AROUND line 137, find this line:

        $ajaxUrl = SFHOMEURL.'index.php?sp_ahah=admintools&sfnonce='.wp_create_nonce('forum-ahah').'&action=delete-post&killpost='.$post['post_id'].'&killposttopic='.$post['topic_id'].'&killpostforum='.$post['forum_id'].'&killpostpopster='.$post['user_id'].'&page='.$page;

because of version differences...  its about 4 lines of code lower than the one you referenced...

in that line, you would change killpostpopster to killpostposter

We are missunderstanding each other Steve.

I allready did change killpostpopster to killpostposter. No problem with that, except i got the permission issue as stated above.

However when you responded:

well, I cannot replicate any problem like that…  same problem before the change, but fixed after… and the only way to get that message is if this check failed:

    if (sp_get_auth('delete_any_post', $forumid) || (sp_get_auth('delete_own_posts', $forumid) && $spThisUser->ID == $poster)) {

I thought that you asked me to check that code string as well, which i did, but i supose i did missunderstand you?

 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 14, 2013 - 2:35 pm

No, I responded that if you made the change, then the only way to get the text message you related was if that auth check was failing...   there was nothing to check per se in that line I pointed to as the reason for the message...  and sorry, the line of code I referenced is actually in a different file (forum/database/sp-db-management.php line 630)

either the user cannot delete any post OR the user cannot delete own posts if the current post being delete is theirs...

I guess it might be good info to know which portion of that auth check is failing...

also if you could right click on the Delete this post link in the admin tools popup and inspect it to the onclick portion of the link, it would be helpful too..

but with the change, users deleting their own posts is working fine for me on multiple test sites now...

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 16, 2013 - 11:29 am

so you sent me some credentials... and the user only has one post... but it also does not appear that the user can delete their own posts (not offered chance to delete)

is this delete issue on different site than the subforum icon issue?

Avatar
Meztli
Sweden
Member
sp_UserOfflineSmall Offline
Oct 16, 2013 - 11:29 am

Mr Papa said

either the user cannot delete any post OR the user cannot delete own posts if the current post being delete is theirs...

I guess it might be good info to know which portion of that auth check is failing...

also if you could right click on the Delete this post link in the admin tools popup and inspect it to the onclick portion of the link, it would be helpful too..

but with the change, users deleting their own posts is working fine for me on multiple test sites now...

If i give the users premission to delete ALL posts, it works as intended. But if i remove that permission and they only have rights to delete their OWN, it does not work.

Hmm not sure i did what you wanted, but here is an image of admin tools popup link:

unclick.jpgImage Enlarger

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
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