Support Forum

Members not able to delete own posts

40 Answers

New Answer

MP Mr Papa
Mr Papa
Member

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

ME Meztli
Meztli
Member

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?

 

MP Mr Papa
Mr Papa
Member

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…

MP Mr Papa
Mr Papa
Member

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?

ME Meztli
Meztli
Member

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.jpg
MP Mr Papa
Mr Papa
Member

but per my last, the test user you sent me, does not have permission to delete their own post…  not even presented the forum tools…

have we been talking around each other here?   When you said it did not work, that to me means they click on delete post and it fails..  did you mean they dont even get a chance (completely different issue)?

ME Meztli
Meztli
Member

Mr Papa said
but per my last, the test user you sent me, does not have permission to delete their own post…  not even presented the forum tools…

have we been talking around each other here?   When you said it did not work, that to me means they click on delete post and it fails..  did you mean they dont even get a chance (completely different issue)?

You got me right Steve.

The test user sent to you is:

  • member
  • members have standard access
  • and standard access give the permisson to delete own posts (as shown before in a image)

And you are right about the forum tools. The test user is not even presented them. I did not notice that until you wrote it.

I dont understand what is happening. Everything did work prior to the “responsive” SP update, and nothing is changed. Only thing i have done, is updating.

I am very confused!!

 

MP Mr Papa
Mr Papa
Member

there was no changes here for the responsive update per se…  and that was multiple versions ago…

well, if they are not getting the forum tools, that is an entirely different beast…  interesting that in my research of what I thought your problem was I did find an issue with users being able to delete their own posts…  

still dont see a problem with getting the forum tools though – that was and is working for me…

also, it appears you have disabled the permissions tab of a user’s profile??  at least the test user you sent me cannot see it in the profile…  nice second way for a given user to verify what their permissions are…

I assume there is not a general issue on your site with getting the forum tools?

at this point, I think I will need ftp access to troubleshoot why no forum tools for the user…  its a simple check for auth to delete own posts and that the poster id equals the current user id…

ME Meztli
Meztli
Member

Mr Papa said
there was no changes here for the responsive update per se…  and that was multiple versions ago…

well, if they are not getting the forum tools, that is an entirely different beast…  interesting that in my research of what I thought your problem was I did find an issue with users being able to delete their own posts…  

still dont see a problem with getting the forum tools though – that was and is working for me…

also, it appears you have disabled the permissions tab of a user’s profile??  at least the test user you sent me cannot see it in the profile…  nice second way for a given user to verify what their permissions are…

I assume there is not a general issue on your site with getting the forum tools?

at this point, I think I will need ftp access to troubleshoot why no forum tools for the user…  its a simple check for auth to delete own posts and that the poster id equals the current user id…

Hi Steve,

I actualy did stop update my forum at the same time the SP update required WordPress 3.6 because my sites old framework did not support it. But then a short while ago i changed framework which finaly gave me the chance to update the forum to the latest version.

Yes, the permission tab is disabled.

About the forum tools, i simply dont know, since i was not aware of the issue until you pointed out it yesterday. And i had no chance testing it out since i have been working a lot last couple of days.

I will send a pm tonight with ftp credentials.

Cheers

 

MP Mr Papa
Mr Papa
Member

So I guess same question though…  are the forum tools generally working?  do they work for you as admin?  just not for the users who’s only access will be deleting their own posts?

ME Meztli
Meztli
Member

Hi Steve,

I am accually having the very same issue at my testsite.

Members can not delete their own post with following permissions given:

permissions.jpg
ME Meztli
Meztli
Member

Forgot to mention that the forum tools are working, both at the main site and test site. So every thing is fine except the delete issue (and subforum icons ofc, but thats an other topic).

Cheers

P.S.

I can pm you the user and admin logins to my testsite if you wish. You are welcome to try and test what ever you want and need to find the reasons behind the issues. Nothing important is stored at my testsite.

MP Mr Papa
Mr Papa
Member

on the test site, I assume you made the needed code change?

so yeah, need the ftp credentials to debug this further as to why the auth check is failing to show the forum tools…  I see I have one unread pm, so you may have already sent…

ME Meztli
Meztli
Member

Mr Papa said
on the test site, I assume you made the needed code change?

so yeah, need the ftp credentials to debug this further as to why the auth check is failing to show the forum tools…  I see I have one unread pm, so you may have already sent…

Hi Steve,

It´s to my main site.

I will send you a pm with all the needed credtials for my testsite incl ftp access.

You are free to take what ever actions neeeded at the testsite.

Cheers

 

MP Mr Papa
Mr Papa
Member

okay, thanks… will be tomorrow as be shoving off soon here…  its homecoming night at my son’s football game…