Hi Guys,
It seems that none of my forum members are able to delete there own posts since i updated the forum. I did try to toggle the permission off and on, but it did not change anything.
Hi Guys,
It seems that none of my forum members are able to delete there own posts since i updated the forum. I did try to toggle the permission off and on, but it did not change anything.
which permission? there are multiple delete permissions.. please tell me the status of all them… they may be ‘fighting’ each other…
so you have edit forever checked and edit until a reply checked… pick the one that you really want there… I suspect you want to uncheck the edit until reply…
Mr Papa said
so you have edit forever checked and edit until a reply checked… pick the one that you really want there… I suspect you want to uncheck the edit until reply…
OK i did that, but the problem still remain, members can not delete their own posts.
The strange thing is, after clicking delete the post disapear as it should. But the post is back again when you reset the page.
I will have to open a ticket for research… and see if we can duplicate… but sounds like at least ajax part is working, so maybe something got knocked for users when that was implemented…
Mr Papa said
I will have to open a ticket for research… and see if we can duplicate… but sounds like at least ajax part is working, so maybe something got knocked for users when that was implemented…
I can give you admin rights at my site if it makes things easier for you. Then you might run a debugging tool or similar.
thanks. let me test it locally first… as I mentioned in one of your other topics, I am guessing we knocked this when we changed the deletion to use ajax…
yeah, bug in the delete post ajax for users deleting their own posts.. typo in an argument…
is fixed in next version…
if you want to fix now, in file simple-press/forum/content/ahah/sp-ahah-admintoollinks.php, 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;
you will want to change the
killpostpopster
argument to
killpostposter
within that line… sorry for the issue…
Thanks Steve,
I did change the argument.
But members still cant delete their own posts. A new message did popup after you reset the page: “access denied, you dont have the right permission”.
However i am 100% sure members do have the correct permissions. I have been double checking every little detail.
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…
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.
as stated in post #9, its simple-press/forum/content/ahah/sp-ahah-admintoollinks.php
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.
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’]) {