
The recent version of Topic polls that was released a week ago removed the ability for non-admins to create a poll.
The ability doesn’t show when creating a new topic.
Admins can see it, but non-admins can’t.
I checked the settings to ensure bbpress forum participants have access, and they do.
I checked the example user to confirm they are a participant, and they are, but no checkbox to create a poll is shown.
This only started happening after upgrading both GD bbpress and the polls plugin to the latest version.
My GD Bbpress version is 6.1.4, polls plugin is version 3.1.2
-
Milan Petrovic
Keymaster -
Milan Petrovic
KeymasterAugust 5, 2021 at 10:53 pm #66439Hi,
I have tested the latest plugin version (GD Topic Polls Pro 3.3.3), and it works fine, I can create polls with users with any role enabled in the plugin settings.
You are using a version from last year (3.1.2 was released over a year ago). I checked the list of plugins you downloaded, and your last download was over a year ago. You have not updated anything since then. Dev4Press Updater plugin has to be updated regularly (at least twice a year) to maintain update access, and you have not updated the Updater plugin for a long time. GD bbPress Toolbox Pro is currently at the 6.5.1 version.
Start by manually updating the Dev4Press Updater to 4.4.2 (latest version) – you can download it from this page: https://updater.dev4press.com/ and follow the Manual Update info from this page: https://updater.dev4press.com/install/
Let me know when you test with new versions of the plugin (3.3.3). If it doesn’t work, it is possible that something else is wrong, but try new version first.
Regards,
MilanDev4Press - Premium plugins for WordPress.
-
Vanessa
ParticipantAugust 10, 2021 at 4:59 pm #66444Hi there,
I upgraded to
GDBBPress Pro 6.5.2
and GD Topic Polls Pro 3.3.3The issue is still present on my sites even after the update.
I resaved the permissions again and cleared all caches, but participants are still not able to create a poll.Let me know if you need any more info to help you debug.
-
Milan Petrovic
KeymasterAugust 10, 2021 at 5:26 pm #66445Hi,
Do you have some membership-related plugin, or maybe something dealing with user roles, or some custom code that may explain this?
GD Topic Polls actually modifies bbPress roles on each page load to add new ‘gdpol_create_poll’ capability. All user roles with this capability can create new polls. There is nothing else related to check if the user can create a poll.
Regards,
MilanDev4Press - Premium plugins for WordPress.
-
SCAFFIES
ParticipantAugust 20, 2021 at 12:30 pm #66479We have the same issue (as you know).
No role can add topic polls anymore (admin/keymaster or participant/subscriber.
We use the “Paid Memberships Pro” system to collect donations, but this worked before, then with a plugin / wordpress 5.8 update die clickbox to add a poll with a new topic post disappeared.
We are unsure what triggers the disappearance of the click box … and we wonder if there is any other way to let regular members created new topic polls?
-
Vanessa
ParticipantAugust 20, 2021 at 1:23 pm #66480Yes we use PMPPro as well.
I did some more investigation, and it looks like somehow the capability gdpol_create_poll is now added to each WordPress role as disabled.
A workaround is to go to each WordPress role and specifically enable this capability. Which can be a pain if you have a lot of roles.
We used the Members – Membership & User Role Editor Plugin
I do think it’s an issue recently introduced by either GD Polls or PMPPro recently. We never experienced this issues before last month.
1 user thanked author for this post.
-
Milan Petrovic
KeymasterAugust 20, 2021 at 4:20 pm #66483I am not sure why that happens. My plugin assigns that capability and sets it to ‘true’ or ‘false’ based on the role enabled for polls in the plugin settings. It is not setting the capability to individual users, only roles.
So, the only three things coming to mind are: (1) the old issue bbPress had that some code related to user roles is called before bbPress was ready resulting in issues with the way roles work (that should throw a warning in code); (2) somehow the role settings are saved in wp_options even so they should not be saved (bbPress roles are all dynamic, they should not be saved anywhere). If a plugin (like PMP) is doing something to the roles processing, it might cause this; (3) capability value is somehow added to the user (again, plugin like PMP may be doing something) with wrong value.
I have this on the list for deeper testing, and I will attempt to setup the PMP plugin to see if I can debug the issue, and if the issue is possible to replicate.
In the meantime, I will try to release plugin update next week that will introduce filter to override the capability check.
Milan
Dev4Press - Premium plugins for WordPress.
1 user thanked author for this post.
-
SCAFFIES
ParticipantAugust 20, 2021 at 4:57 pm #66484Thanks for keeping an eye on it, and trying to fix it in some way .. regardless of what other plugin is (likely) causing it, and not yours!
-
Milan Petrovic
KeymasterAugust 21, 2021 at 10:27 am #66485Version 3.3.4 adds a new filter. Here is the use example:
add_filter('gdpol_user_can_create_poll', 'custom__gdpol_user_can_create_poll', 10, 2); function custom__gdpol_user_can_create_poll($can, $user_id) { // $can has to be TRUE or FALSE, and you can modify it here before returning. // $user_id is the ID of the current user, or 0 if the user is not logged in. return $can; }
Dev4Press - Premium plugins for WordPress.
-
SCAFFIES
ParticipantAugust 21, 2021 at 11:57 am #66486Thanks for staying on top of this.
Version 3.3.4 did not make any difference on our site – see the acreenshot attached. Same as before (for admins and for participants).
-
Milan Petrovic
KeymasterAugust 21, 2021 at 4:01 pm #66488I would not expect it to make any change, the way the plugin works has not changed.
In my previous reply, I provided you with an example code for a new filter that can be used to override access to the topic polls. So, in your case, for some reason, the capability is set to false for nonadmin users, but with the filter provided, you can do your own checks to see who can access the form.
Here is that code with a check for allowed user roles:
add_filter('gdpol_user_can_create_poll', 'custom__gdpol_user_can_create_poll', 10, 2); function custom__gdpol_user_can_create_poll($can, $user_id) { if ($can === false && $user_id > 0) { $can = d4p_is_current_user_roles(array('bbp_keymaster', 'bbp_moderator', 'bbp_participant')); } return $can; }
Dev4Press - Premium plugins for WordPress.
1 user thanked author for this post.
-
SCAFFIES
ParticipantAugust 21, 2021 at 4:39 pm #66489Thank you very much!
I am embarrassed to ask … how do I use the filter, where do I copy / paste it to?
Thanks,
Kevin
Volunteer Administrator -
Milan Petrovic
Keymaster -
strangerstudios
ParticipantAugust 30, 2021 at 5:25 pm #73751Hi, all. We just recently released an update for PMPro Roles (v1.4.1) that I think may solve the issue you are having here. Can you let me know if you still see issues with users losing roles when changing levels (other than the ones they are supposed to lose) after updating?
There are lots of moving parts here, so it’s possible the issues described here are similar but different. But we did fix a bug where roles were being dropped by accident in this recent update, and I’d like to know if it works for ya or if we need to keep digging. Thanks.
FYI the update will not fix old users. It will only fix the issue going forward.
-
Milan Petrovic
KeymasterAugust 30, 2021 at 5:34 pm #73753Hey, thanks for the update on the issue. My plugin just adds the new capability to the bbPress dynamic role and sets it to ‘true’, and that should not be saved in the DB for role or use (bbPress dynamic roles), and for users using PMP plugin for some reason that gets saved.
Dev4Press - Premium plugins for WordPress.
-
konstantin
ParticipantOctober 5, 2021 at 2:31 pm #73924I experienced similar issue on our community forum.
The website is quite bare-bone, having only the forum and a number of supporting plugins installed: bbP private groups, bbp style pack, WP User Avatars, WP User Profiles.
I have tried disabling these plugins, but the checkbox to make a poll out of a topic is not appearing.
How can I debug the issue? What else is there to try?
-
konstantin
ParticipantOctober 5, 2021 at 2:32 pm #73925This reply has been marked as private. -
Milan Petrovic
KeymasterOctober 5, 2021 at 3:24 pm #73926You would need to check if the user that you try to make the poll with has the ‘gdpol_create_poll’ set for some reason, and if it is set to false. My plugin assigns this capability to role only, but some role management plugins were setting capabilities directly to users.
Dev4Press - Premium plugins for WordPress.
-
konstantin
ParticipantOctober 5, 2021 at 6:07 pm #73927I would need to check that directly in the database? Could you orient me a bit where to look for it please?
-
Milan Petrovic
KeymasterOctober 5, 2021 at 6:47 pm #73928I have just released new versions for Pro and Lite that include a new option for this problem, check out the post: https://www.dev4press.com/blog/plugins/2021/gd-topic-polls-pro-3-4-for-bbpress/.
Dev4Press - Premium plugins for WordPress.
-
konstantin
ParticipantOctober 6, 2021 at 10:38 am #73940Excellent! Thanks Milan, now it works on our website! With the option in plugin Settings “Check user role only”.
- The topic ‘Recent update removed ability for non-admins to create polls’ is closed to new replies.