To make this clear. Do you mean that when a logged in user is viewing his own profile page he cannot delete the entries in the list?
Is the “delete” link displayed?
What happens when the user clicks “delete”?
Thread Starter
alpha2
(@neoseeyou)
Hello
Yes when the user is viewing his own profile , he is not able to see the delete button and so can’t delete any entry.
Only admin user can see the delete button
Thread Starter
alpha2
(@neoseeyou)
last version didn’t solve the problem unfortunatly 🙁
There is one line of code that controls the display of the “Delete” button on line 414:
if($entry["created_by"] == $current_user->ID || current_user_can('delete_others_posts')) {
If the entry is created by the currently logged in user or if the user has ability to delete others posts (Admin and Editor user roles) it should display the button.
If you edit the plugins main file you could try to compare the ID uf the user with the currently logged in user.
Paste this code before line 414:
var_dump($entry["created_by"]);
var_dump($current_user->ID);
Log in as the user and go to the profile page and tell me that it says.
Thread Starter
alpha2
(@neoseeyou)
Thank you for your answer, i checked sticky-list.php and
if($entry[“created_by”] == $current_user->ID || current_user_can(‘delete_others_posts’))
is line 398
i add your code before if($enable_delete) line 395
When i visit as the user i have this code :
string(1) “2” NULL string(1) “2” NULL string(1) “2” NULL string(1) “2” NULL string(1) “2” NULL string(1) “2” NULL string(1) “2” NULL string(1) “2” NULL string(1) “2” NULL string(1) “2” NULL string(1) “2” NULL string(1) “2” NULL string(1) “2” NULL
Great. Then we have the problem pinpointed. The variable that is NULL is supposed to hold the currently logged in users ID.
It seems that buddypress does not use the same method for getting the currently logged in user as standard WordPress does.
I will publish a fix within a couple of days.
Thread Starter
alpha2
(@neoseeyou)
Thank you! yes i guess this particular problem is due to buddypress
Thread Starter
alpha2
(@neoseeyou)
is 1.1.6 suppose to solve this issue?
Thank you
No. A fix will be released and a new version will uploaded soon.
I have (hopefully) fixed this issue in the latest release (1.1.7). Grab it and see if it solves your issue.
Thread Starter
alpha2
(@neoseeyou)
Hello
Unfortunatly no 🙁 i don’t know why and now i have double “sticky list” option in the form settings menu.
See attach
Thank you
I have fixed the double “sticky list” option bug, thanks for reporting.
I have also updated the plugin to use a better way of getting the currently logged in user that hopefully plays nice with BuddyPress.
Grab the new version (1.2) and see if that solves your issues.
Thread Starter
alpha2
(@neoseeyou)
Hello! really a great thank you what you do, it solve both issues. Perfect support as always.
Thanks! I’ll mark this topic as resolved then. Feel free to open a new one if you need 🙂