...it looks like the User was successfully changed to "partner" role, based on the log information. Did you check the User's profile in wp-admin?
Hi Christian,
yes!
Test accounts are changed from 'contributor' to 'partner'...
It seems that custom PHP code function only works when the child theme is active. But child theme cannot be active because then website looks basic without styling and some functionalities ...
Also, even user role is changed, I am still receiving popup error while submitting a form, so and I need to refresh the page to see changes in user role...
So in short here are my bugs:
1. Custom PHP code for a change of user role only works if the child theme is active (but then no styling and some functionalities)
2. Submitting of that CRED form for that user role change again reports popup error, but a user is changed and role is visible only after page refresh. (It should be displayed a message added in CRED form, AJAX submission)
3. Erorr Notice is again visible on the bottom of every opened plugin edit window and shows some plugin error:
Notice: Undefined index: handle in /customers/1/c/5/geoproblem.one/httpd.www/wp-content/plugins/wp-views/embedded/inc/classes/wpv-shortcode-generator.php on line 949 Notice: Undefined index: handle in /customers/1/c/5/geoproblem.one/httpd.www/wp-content/plugins/wp-views/embedded/inc/classes/wpv-shortcode-generator.php on line 949
Thank you in advance for solutions,
Sinisa
1. Custom PHP code for a change of user role only works if the child theme is active (but then no styling and some functionalities)
If you do not want to use a child theme, you can add a plugin like "Code Snippets" that allows you to add PHP without modifying your theme's files. Remove the code that was added to functions.php and add it to a Code Snippet, and reactivate the parent theme. Here is a link to that plugin: https://wordpress.org/plugins/code-snippets/
2. Submitting of that CRED form for that user role change again reports popup error, but a user is changed and role is visible only after page refresh. (It should be displayed a message added in CRED form, AJAX submission)
This sounds like a separate issue. The User role is being changed correctly, and that is the focus of this ticket. Feel free to create a separate ticket for this problem.
3. Erorr Notice is again visible on the bottom of every opened plugin edit window and shows some plugin error:
Notice: Undefined index: handle in /customers/1/c/5/geoproblem.one/httpd.www/wp-content/plugins/wp-views/embedded/inc/classes/wpv-shortcode-generator.php on line 949 Notice: Undefined index: handle in /customers/1/c/5/geoproblem.one/httpd.www/wp-content/plugins/wp-views/embedded/inc/classes/wpv-shortcode-generator.php on line 949
This sounds like a separate issue as well, because the User role is being changed as expected. Please create separate tickets for each issue.
Ok. Code snippets works well. I will open another thread with those other issues..
Thank you very much on support!
Sinisa