Change WordPress user roles and capabilities › Forums › Bug Reports › Possible conflict with GeneratePress and The Event Calendar (TEC) plugins
- This topic has 12 replies, 2 voices, and was last updated 7 months, 3 weeks ago by City Employee.
-
AuthorPosts
-
13/07/2023 at 00:26 #8302City EmployeeParticipant
We may have found part of the issue. While experimenting with adding additional capabilities to the custom User Role Editor Author role, we found toggling the following Custom capability on to resolve the issue:
ure_manage_options
So if we add that to the Author role with our GeneratePress (GP) theme enabled we can update an instance of an event calendar series. If we toggle that capability off with the GP theme enabled the event update fails. If we switch to the Twenty Twenty-Three theme and toggle that capability off then the even update succeeds.
There seems to be something related to having the User Role Editor and GP theme enabled that requires that capability for a TEC instance of a series to be updated by the Author role. Any ideas on a fix? We don’t believe it was required in the past.
GP Premium Version 2.3.1
The Events Calendar Version 6.1.2.2
The Events Calendar Pro Version 6.1.0
User Role Editor Pro Version 4.63.5
WordPress 6.2.2
PHP 8.0Steps to reproduce:
Install the plugins and activate the theme
Modify the Author role in URE to have all the Series, Venues, Organizers, and Events capabilities
Create and publish a new repeating event: Events > Add New
Edit an instance of the series: Events > Series > Select the series
Select an instance in the Events in this Series list and choose the Edit option
Change the title of the event instance and then select the Update button
Select This and following events on the Edit Recurring Events popup screen and click OK
Update fails13/07/2023 at 15:46 #8303VladimirKeymasterIs it possible to get the admin access to the stage copy of the described installation? I would investigate the issue in my local development environment then. If Yes, send login credentials to support [at-sign] role-editor.com
I use commercial software locally and in the investigation purpose only.24/07/2023 at 15:52 #8311City EmployeeParticipantHi Vladimir – Just sent you an email with a password reset link for admin access to our site. Also, in case this helps:
Scenario 1
Turn off the “Activate Block Editor for Events” in The Event Calendar settings and toggled off the ure_manage_options with the Twenty Twenty-One theme enabled, the update fails with a 502 bad gateway message.Scenario 2
Turn off the “Activate Block Editor for Events” in The Event Calendar settings and toggled on the ure_manage_options with the Twenty Twenty-One theme enabled, the update succeeds.Scenario 3
Turn off the “Activate Block Editor for Events” in The Event Calendar settings and toggled off the ure_manage_options with the Twenty Twenty-Three theme enabled, the update succeeds.Scenario 4
Turn off the “Activate Block Editor for Events” in The Event Calendar settings and toggled off the ure_manage_options with the Twenty Twenty-Three theme enabled, the update succeeds.Scenario 5
Turn on the “Activate Block Editor for Events” in The Event Calendar settings and toggled off the ure_manage_options with the Twenty Twenty-Three theme enabled, the update succeeds.Scenario 6
Turn on the “Activate Block Editor for Events” in The Event Calendar settings and toggled off the ure_manage_options with the GeneratePress vanilla theme enabled, the update fails.Scenario 7
Turn off the “Activate Block Editor for Events” in The Event Calendar settings and toggled off the ure_manage_options with the GeneratePress vanilla theme enabled, the update fails with 502 bad gateway.Scenario 8
Turn off the “Activate Block Editor for Events” in The Event Calendar settings and toggled on the ure_manage_options with the GeneratePress vanilla theme enabled, the update succeeds.Scenario 9
Turn on the “Activate Block Editor for Events” in The Event Calendar settings and toggled on the ure_manage_options with the GeneratePress vanilla theme enabled, the update succeeds.The 502 error doesn’t seem to leave an entry in our site logs that we can find.
When the update fails without a 502 error, the following error is displayed on the event edit screen “Updating failed. The response is not a valid JSON response.”We can basically get all configurations to work when ure_manage_options is enabled for the Author role. We’re unsure exactly what it does.
Thanks
25/07/2023 at 03:32 #8312VladimirKeymasterThanks for the provided information. I will investigate the problem.
01/08/2023 at 00:11 #8321City EmployeeParticipantHi Vladimir – we may have made some progress in identifying the issue:
The following scenarios are with a GeneratePress Pro child theme enabled.
When the Author user role has its Post Edit access set to Prohibit and specific post IDs are included, the event calendar series update fails.
When the Author user role has its Post Edit access set to Allow and no specific post IDs are included, the calendar series update succeeds.
When the Author user role has its Post Edit access set to Prohibit, specific post IDs are included, and the ure_manage_options capability is enabled, then the event calendar series update succeeds.
So what we’re trying to get to work is:
The Author user role has its Post Edit access set to Prohibit and specific post IDs are included and the ure_manage_options capability is not enabled for the Author role.
01/08/2023 at 02:45 #8322VladimirKeymasterHi,
Thanks. I confirm that update issue is related to the post edit restrictions set to the Author role. I need more time to catch the bug.
Take into account that ‘ure_manage_options’ is a superadmin capability for User Role Editor. Role with this capability is not restricted in any manner. In this case URE just ingnores post edit restrictions set for a role.
01/08/2023 at 17:43 #8323City EmployeeParticipantHi Vladimir,
Here’s the response from TEC support so far:
“On our end, we did make a lot of big changes to how we structure how the database handles certain events, especially recurring events – you can read more here:
Again though, these database changes shouldn’t affect user roles like how you’re describing.”
08/08/2023 at 03:31 #8331VladimirKeymasterI tried repeat the issue locally to isolate a problem using debugger, but without success. When I tried again on-line at dev copy, user with ‘author’ role updated the seria with added event successfully. The only change I see – is the “Classic Editor” instead of the block one. Did you solve a problem?
07/11/2023 at 01:09 #8549City EmployeeParticipantHi Vladimir,
Sorry it took us a while to get back to you on this. We’ve synched our production environment over to our development environment. Here’s the behavior we’re seeing currently:
WordPress CORE 6.3.2
PHP 8.2.10
MySQL 8.0.33-25
The Events Calendar 6.2.5
The Events Calendar Pro 6.2.3
User Role Editor Pro 4.64.1Scenario 1 (Updating failed notice displayed and no changes made successfully)
URE manage options deselected
Posts Edit = Prohibit with post ID 15832, 15790, 11652
GeneratePress child theme activeEditing first instance in series title and update all events in series
******************
Scenario 2 (updating failed notice displayed but changes are made successfully)
URE manage options selected
Posts Edit = Prohibit with post ID 15832, 15790, 11652
GeneratePress child theme activeEditing first instance in series title and update all events in series
*************************
Scenario 3 (updating failed notice displayed but changes are made successfully)
URE manage options deselected
Posts Edit = Prohibit with post ID empty
GeneratePress child theme activeEditing first instance in series title and update all events in series
**************************
Scenario 4 (updating failed notice displayed but changes are made successfully)
URE manage options deselected
Posts Edit = Allowed with post ID empty
GeneratePress child theme activeEditing first instance in series title and update all events in series
******************************
Scenario 5 (Updating failed notice displayed and no changes made successfully)
URE manage options deselected
Posts Edit = Prohibit with post ID 15832, 15790, 11652
GeneratePress parent theme active with child inactiveEditing first instance in series title and update all events in series
**********************************
Scenario 6 (Updating failed notice is not displayed and changes made successfully)
GeneratePress child theme active
URE plugin disabledEditing first instance in series title and update all events in series
07/11/2023 at 01:29 #8550City EmployeeParticipantWe also recently tested the following scenario in addition to the 6 others above:
Scenario 7 (Updating failed notice displayed and no changes made successfully)
URE manage options deselected for the Author role
All other URE capabilities enabled for the Author role
Posts Edit = Prohibit with post ID 15832, 15790, 11652
GeneratePress parent theme active with child inactiveEditing first instance in series title and update all events in series.
**********************************************
So as far as we can tell, there isn’t another capability preventing the Author role from avoiding the update failure notice and making actual changes to the event series instances. It seems to be tied to the URE Manage Options capability and the Edit Posts settings. The only way we can get rid of the failed update notice is by disabling the URE plugin.Thanks for any help you can send our way. Just let us know if there’s anything we can do to help further test.
07/11/2023 at 10:00 #8551VladimirKeymasterHi,
Let’s return to the testing using the fresh copy with the latest versions of software. Send credentials of dev.copy to support[at-sign]role-editor.com in order I can take a copy of the database and plugins/theme files. I will try to repeat the issue according to your testing scenarios and catch the bug(s).
12/12/2023 at 19:14 #8573City EmployeeParticipantHi Vladimir – Checking back on this to see what progress may have been made. We also have some updates based on further testing:
Note that there appear to be different permissions needed to update the Title field of an event series than the permissions needed to update the date/time field of an event series. This threw us off when testing until we discovered it. It may also provide some clues to which capabilities might be involved with this issue.
Granting Author role all capabilities and adding back Posts Edit Prohibit and post IDs (15832, 15790, 11652) and the event series title and time can both be updated without failure notice.
Giving the Author role Activate plugins capability allows updates without failure to both Title and Date/Time fields as long as Posts Edit is set to Allow all. If Posts Edit is set to Prohibit with Post IDs added, the update fails.
Giving Author role Activate plugins capabilities and URE manage options allows updates without failure to both Title and Date/Time fields with Posts Edit is set to Prohibit and post IDs added.
Take away URE Manage Options capability from Author role and Change Posts Edit to Allow and the event series Title can be updated even with a failure notice.
Grant URE Manage Options capability for Author role and add back Posts Edit Prohibit and post IDs (15832, 15790, 11652) and the Title can be updated even with a failure notice.
Grant all URE capabilities for Author role and add back Posts Edit Prohibit and post IDs (15832, 15790, 11652) and the date/time field can’t be updated for a series.
Grant all URE capabilities for Author role and Change Posts Edit to Allow (remove the post IDs) and the date/time field can’t be updated for a series.
Thanks for any updates you can provide.
Deactivating URE also resolves the event calendar series update failing issue.
28/03/2024 at 17:45 #8628City EmployeeParticipantHi Vladimir – Checking back on this. Thanks!
-
AuthorPosts
- You must be logged in to reply to this topic.