After updating to WordPress 4.9.7, I am having major problems with User Roles!
-
I did the update, and now cannot login to the site due to there being a problem with class-wp-roles.php core file.
The exact errors being displayed on the site are:
Warning: array_keys() expects parameter 1 to be array, string given in /srv/disk3/2206425/www/thailandpoolshop.com/wp-includes/class-wp-roles.php on line 278
Warning: Invalid argument supplied for foreach() in /srv/disk3/2206425/www/thailandpoolshop.com/wp-includes/class-wp-roles.php on line 278
The more I look this up, the more I see that many others are having the exact same problem after updating to WordPress 4.9.7.
The theme being used is ‘Storefront’ which is advertised on the WordPress main themes section.
Has anyone got a fix for this?
I currently cannot get any access to the site as an admin or any other role, customers are unable to make purchases, and many pages are not displaying correctly, such as any of the checkout.I have tried reverting back to WordPress 4.9.6 and to 4.9.5 but it just throws the same error now.
I have also tried disabling all plugins which has no effect. Nor does changing the theme.Any help on this matter would be highly appreciated as I am losing money while we speak!
The page I need help with: [log in to see the link]
-
Hi,
Do you have access to the database admin page (e.g. phpMyAdmin)? If yes, perhaps you could try to perform some preliminary checking by following the steps on this website: https://www.role-editor.com/restore-lost-wordpress-admin-permissions/.
Hope this helps.
Best regards,
Regina FooThis may help. But the more I read into the page you sent, the more I’m afraid to go ahead an do so! It mentions that upon resetting the user roles, if WooCommerce etc have changed any role then these will be reset also. I am not entirely sure if this is going to have any effect on my plugins? What do you think?
Understood your concern. Perhaps you could follow Section II. “Does your user still have administrator role?” to see if the table prefix differs from “wp_”.
By the way, may I know which user role logged in that shows you the error?
I am trying to follow the instructions in Section II, am I typing this in as a query? It doesn’t actually state anywhere where I am suppose to put in these lines of code. And databases has never really been my speciality.
Nobody is able to login as the user roles functions are messing up, so no user roles are available on the website including any Administrator, Customer, Subscriber role’s etc. The error messages are being displayed immediately even to first time viewers of the website. They don’t have to be logged in, nor can they login.
Are you using phpMyAdmin? If yes, you could type the SQL statements (e.g. SELECT * FROM …) into the SQL tab after you’ve selected “wordpress” database and click the Go button to see the query result.
Yes I am using phpMyAdmin 4.
Okay thanks for clarifying. When typing this code:
SELECT * FROM wp_users WHERE user_login='your_user_login';
and replacing your_user_login with my own Admin username and clicking the Go button, I am given my user details including the ID which equals 104.
I have then used this code:
SELECT * FROM wp_usermeta WHERE user_id=104 AND meta_key='wp_capabilities'
which displays these results:
umeta_id: 4122
user_id: 104
meta_key: wp_capabilities
meta_value: a:1:{s:13:”administrator”;b:1;}Where do I go from here?
Just to mention once again, my problem is not that a certain user has lost their user-role, the problem is that WordPress doesn’t recognise any of the user-role functions.Please navigate to the website link I provided to see the errors for yourself.
- This reply was modified 6 years, 4 months ago by dayley.
Could you run below SQL query on phpMyAdmin?
SELECT distinct(meta_value) FROM
wp_usermeta
WHERE meta_key=’wp_capabilities’;By the way, do you have any user role related plugin installed? Are you able to list down all the plugins activated on your site?
Here are a few things that need your help to check further on this issue:
(1) Run below SQL query on phpMyAdmin:SELECT distinct(meta_value) FROM wp_usermeta WHERE meta_key=’wp_capabilities’;
(2) Run below SQL query on phpMyAdmin:
select * from
wp_options
where option_name=’wp_user_roles’(3) Check if you have any user role related plugin installed. And if possible, list down all the plugins activated on your site.
(4) Are you using WordPress Multisite?
Okay I have input the script:
SELECT distinct(meta_value) FROM wp_usermeta WHERE meta_key=’wp_capabilities’;
Which returns the following:
a:1:{s:10:”subscriber”;b:1;}
a:1:{s:13:”administrator”;b:1;}
a:1:{s:8:”employee”;b:1;}
a:1:{s:8:”customer”;b:1;}“employee” was a trial basis some while ago and no users have this role yet. So it could be removed as it may also be problematic.
And this line of script:
select * from wp_options where option_name='wp_user_roles'
returns this:
option_id: 90
option_name: wp_user_roles
option_value: A:14:{s:13:”administrator”;a:2:{s:4:”name”;s:13:”A…
autoload: yesThere are no user role plugins. And the errors still show even if all plugins are disabled. But I will add these in a few moments.
No, I am not using WordPress Multisite.
Plugin list:
akismet
all-in-one-wp-migration
Backwpup
buddypress
calculated-fields-form-bk
contact-form-7
contact-form-7-honeypot
contact-form-7-to-database-extension-master
customer-reviews-woocommerce
email-log
facebook-shop-by-storeyacom
faq-responsive
far-future-expiry-header
font-awesome
front-page-category
gzip-ninja-speed-compression
homepage-control
ic-woocommerce-advance-sales-reports-premium-golden
klaviyo
klaviyo-for-woocommerce
logo-carousel-slider
mailchimp-for-woocommerce
meta-tag-manager
nextend-smart-slider3-pro
omise-woocommerce-3.0
polylang
polylang-slug-master
post-expirator
post-grid
product-sales-report-for-woocommerce
redirection
regenerate-thumbnails
remove-footer-credit
subscriber-discounts-for-woocommerce
tawkto-live-chat
ubermenu
user-submitted-posts
weight-based-shipping-for-woocommerce
woo-order-export-lite
woo-poly-integration
woocommerce
woocommerce-2checkout-api-master
woocommerce-advance-free-shipping
woocommerce-auto-added-coupons
woocommerce-cost-of-goods
woocommerce-gateways-discounts-and-fees
woocommerce-google-analytics-integration
woocommerce-menu-extension
woocommerce-pip
woocommerce-product-search
woocommerce-product-sku-generator
wordpress-seo
wp-author-date-and-meta-remover
wp-facebook-login
wp-smushit
wp-stagingThere is also the following files/folder in the plugins folder:
LICENSE KEY.txt
error_log.txt
hello.php
index.php
PhpSpreadsheet-develop
__MACOSXThe ’employee’ role having the key of 8 which is same as the role of ‘customer’. This could cause duplicate key issue. How did this ’employee’ role created previously?
You may use below SQL to check how many users are assigned to ’employee’ role.
SELECT count(1) FROM
wp_usermetaWHERE
meta_value='a:1:{s:8:”employee”;b:1;}';
And from your previous result of below SQL query, could you try to retrieve the complete result of option_value?
select * from wp_options where option_name='wp_user_roles';
I added the new employee role by creating this code for my child theme functions.php which has been working for the past 8 months or so without any problems:
/******************************************************** * Add employee role ********************************************************/ add_role('employee', __( 'Sales Employee'), array( 'read' => true, // Allows a user to read 'read_private_pages'=> true, // Allows reading of private pages 'read_private_posts'=> true, // Allows reading of private posts ) ); /******************************************************** * Adds employee projects meta mapping to dashboard ********************************************************/ add_action( 'init', 'register_sales_projects'); function register_sales_projects() { $args = array( 'label' => __( 'sales_projects', 'sales_projects' ), 'description' => __( 'Sales Projects', 'sales_projects' ), 'labels' => $labels, 'supports' => array( 'title', 'comments', 'revisions', ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'rewrite' => $rewrite, 'capability_type' => array('sale_project','sale_projects'), 'map_meta_cap' => true, ); register_post_type( 'sale_projects', $args ); } /******************************************************** * Allows admins to create projects for employees ********************************************************/ // Add the roles you'd like to administer the custom post types $roles = array('administrator'); // Loop through each role and assign capabilities foreach($roles as $the_role) { $role = get_role($the_role); $role->add_cap( 'read' ); $role->add_cap( 'read_sales_project'); $role->add_cap( 'read_private_sales_projects' ); $role->add_cap( 'edit_sales_project' ); $role->add_cap( 'edit_sales_projects' ); $role->add_cap( 'edit_others_sales_projects' ); $role->add_cap( 'edit_published_sales_projects' ); $role->add_cap( 'publish_sales_projects' ); $role->add_cap( 'delete_others_sales_projects' ); $role->add_cap( 'delete_private_sales_projects' ); $role->add_cap( 'delete_published_sales_projects' ); }
Note: I commented this code out as soon as I got the error regarding WordPress User Roles after the update. So this code is not currently active now.
I too also noticed that the subscriber & employee role both were assigned to key 8, so I already deleted the 1 user that was using this employee role that I created only for testing purposes. (Deleted user: TempEmployeeUser)
SELECT count(1) FROM wp_usermeta WHERE meta_value='a:1:{s:8:”employee”;b:1;}';
This now displays 0.
and the complete result of option_value is:
A:14:{s:13:"administrator";a:2:{s:4:"name";s:13:"Administrator";s:12:"capabilities";a:185:{s:13:"switch_themes";b:1;s:11:"edit_themes";b:1;s:16:"activate_plugins";b:1;s:12:"edit_plugins";b:1;s:10:"edit_users";b:1;s:10:"edit_files";b:1;s:14:"manage_options";b:1;s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:6:"import";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:8:"level_10";b:1;s:7:"level_9";b:1;s:7:"level_8";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;s:12:"delete_users";b:1;s:12:"create_users";b:1;s:17:"unfiltered_upload";b:1;s:14:"edit_dashboard";b:1;s:14:"update_plugins";b:1;s:14:"delete_plugins";b:1;s:15:"install_plugins";b:1;s:13:"update_themes";b:1;s:14:"install_themes";b:1;s:11:"update_core";b:1;s:10:"list_users";b:1;s:12:"remove_users";b:1;s:13:"promote_users";b:1;s:18:"edit_theme_options";b:1;s:13:"delete_themes";b:1;s:6:"export";b:1;s:24:"manage_events_categories";b:1;s:12:"access_zopim";b:1;s:36:"wpml_manage_woocommerce_multilingual";b:1;s:37:"wpml_operate_woocommerce_multilingual";b:1;s:10:"loco_admin";b:1;s:7:"nextend";b:1;s:14:"nextend_config";b:1;s:19:"nextend_visual_edit";b:1;s:21:"nextend_visual_delete";b:1;s:11:"smartslider";b:1;s:18:"smartslider_config";b:1;s:16:"smartslider_edit";b:1;s:18:"smartslider_delete";b:1;s:15:"wpseo_bulk_edit";b:1;s:18:"manage_woocommerce";b:1;s:24:"view_woocommerce_reports";b:1;s:12:"edit_product";b:1;s:12:"read_product";b:1;s:14:"delete_product";b:1;s:13:"edit_products";b:1;s:20:"edit_others_products";b:1;s:16:"publish_products";b:1;s:21:"read_private_products";b:1;s:15:"delete_products";b:1;s:23:"delete_private_products";b:1;s:25:"delete_published_products";b:1;s:22:"delete_others_products";b:1;s:21:"edit_private_products";b:1;s:23:"edit_published_products";b:1;s:20:"manage_product_terms";b:1;s:18:"edit_product_terms";b:1;s:20:"delete_product_terms";b:1;s:20:"assign_product_terms";b:1;s:15:"edit_shop_order";b:1;s:15:"read_shop_order";b:1;s:17:"delete_shop_order";b:1;s:16:"edit_shop_orders";b:1;s:23:"edit_others_shop_orders";b:1;s:19:"publish_shop_orders";b:1;s:24:"read_private_shop_orders";b:1;s:18:"delete_shop_orders";b:1;s:26:"delete_private_shop_orders";b:1;s:28:"delete_published_shop_orders";b:1;s:25:"delete_others_shop_orders";b:1;s:24:"edit_private_shop_orders";b:1;s:26:"edit_published_shop_orders";b:1;s:23:"manage_shop_order_terms";b:1;s:21:"edit_shop_order_terms";b:1;s:23:"delete_shop_order_terms";b:1;s:23:"assign_shop_order_terms";b:1;s:16:"edit_shop_coupon";b:1;s:16:"read_shop_coupon";b:1;s:18:"delete_shop_coupon";b:1;s:17:"edit_shop_coupons";b:1;s:24:"edit_others_shop_coupons";b:1;s:20:"publish_shop_coupons";b:1;s:25:"read_private_shop_coupons";b:1;s:19:"delete_shop_coupons";b:1;s:27:"delete_private_shop_coupons";b:1;s:29:"delete_published_shop_coupons";b:1;s:26:"delete_others_shop_coupons";b:1;s:25:"edit_private_shop_coupons";b:1;s:27:"edit_published_shop_coupons";b:1;s:24:"manage_shop_coupon_terms";b:1;s:22:"edit_shop_coupon_terms";b:1;s:24:"delete_shop_coupon_terms";b:1;s:24:"assign_shop_coupon_terms";b:1;s:17:"edit_shop_webhook";b:1;s:17:"read_shop_webhook";b:1;s:19:"delete_shop_webhook";b:1;s:18:"edit_shop_webhooks";b:1;s:25:"edit_others_shop_webhooks";b:1;s:21:"publish_shop_webhooks";b:1;s:26:"read_private_shop_webhooks";b:1;s:20:"delete_shop_webhooks";b:1;s:28:"delete_private_shop_webhooks";b:1;s:30:"delete_published_shop_webhooks";b:1;s:27:"delete_others_shop_webhooks";b:1;s:26:"edit_private_shop_webhooks";b:1;s:28:"edit_published_shop_webhooks";b:1;s:25:"manage_shop_webhook_terms";b:1;s:23:"edit_shop_webhook_terms";b:1;s:25:"delete_shop_webhook_terms";b:1;s:25:"assign_shop_webhook_terms";b:1;s:20:"wpseo_manage_options";b:1;s:8:"backwpup";b:1;s:13:"backwpup_jobs";b:1;s:18:"backwpup_jobs_edit";b:1;s:19:"backwpup_jobs_start";b:1;s:16:"backwpup_backups";b:1;s:25:"backwpup_backups_download";b:1;s:23:"backwpup_backups_delete";b:1;s:13:"backwpup_logs";b:1;s:20:"backwpup_logs_delete";b:1;s:17:"backwpup_settings";b:1;s:22:"edit_klaviyo_shop_cart";b:1;s:22:"read_klaviyo_shop_cart";b:1;s:24:"delete_klaviyo_shop_cart";b:1;s:23:"edit_klaviyo_shop_carts";b:1;s:30:"edit_others_klaviyo_shop_carts";b:1;s:26:"publish_klaviyo_shop_carts";b:1;s:31:"read_private_klaviyo_shop_carts";b:1;s:25:"delete_klaviyo_shop_carts";b:1;s:33:"delete_private_klaviyo_shop_carts";b:1;s:35:"delete_published_klaviyo_shop_carts";b:1;s:32:"delete_others_klaviyo_shop_carts";b:1;s:31:"edit_private_klaviyo_shop_carts";b:1;s:33:"edit_published_klaviyo_shop_carts";b:1;s:30:"manage_klaviyo_shop_cart_terms";b:1;s:28:"edit_klaviyo_shop_cart_terms";b:1;s:30:"delete_klaviyo_shop_cart_terms";b:1;s:30:"assign_klaviyo_shop_cart_terms";b:1;s:18:"read_sales_project";b:1;s:27:"read_private_sales_projects";b:1;s:18:"edit_sales_project";b:1;s:19:"edit_sales_projects";b:1;s:26:"edit_others_sales_projects";b:1;s:29:"edit_published_sales_projects";b:1;s:22:"publish_sales_projects";b:1;s:28:"delete_others_sales_projects";b:1;s:29:"delete_private_sales_projects";b:1;s:31:"delete_published_sales_projects";b:1;s:16:"backwpup_restore";b:1;s:16:"aiosp_manage_seo";b:1;}}s:6:"editor";a:2:{s:4:"name";s:6:"Editor";s:12:"capabilities";a:44:{s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;s:24:"manage_events_categories";b:1;s:7:"nextend";b:1;s:14:"nextend_config";b:1;s:19:"nextend_visual_edit";b:1;s:21:"nextend_visual_delete";b:1;s:11:"smartslider";b:1;s:18:"smartslider_config";b:1;s:16:"smartslider_edit";b:1;s:18:"smartslider_delete";b:1;s:15:"wpseo_bulk_edit";b:1;}}s:6:"author";a:2:{s:4:"name";s:6:"Author";s:12:"capabilities";a:11:{s:12:"upload_files";b:1;s:10:"edit_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:4:"read";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:1;s:22:"delete_published_posts";b:1;s:24:"manage_events_categories";b:1;}}s:11:"contributor";a:2:{s:4:"name";s:11:"Contributor";s:12:"capabilities";a:5:{s:10:"edit_posts";b:1;s:4:"read";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:1;}}s:10:"subscriber";a:2:{s:4:"name";s:10:"Subscriber";s:12:"capabilities";a:2:{s:4:"read";b:1;s:7:"level_0";b:1;}}s:10:"translator";a:2:{s:4:"name";s:10:"Translator";s:12:"capabilities";a:2:{s:4:"read";b:1;s:10:"loco_admin";b:1;}}s:8:"customer";a:2:{s:4:"name";s:8:"Customer";s:12:"capabilities";a:1:{s:4:"read";b:1;}}s:12:"shop_manager";a:2:{s:4:"name";s:12:"Shop manager";s:12:"capabilities";a:126:{s:7:"level_9";b:1;s:7:"level_8";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:4:"read";b:1;s:18:"read_private_pages";b:1;s:18:"read_private_posts";b:1;s:10:"edit_users";b:1;s:10:"edit_posts";b:1;s:10:"edit_pages";b:1;s:20:"edit_published_posts";b:1;s:20:"edit_published_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"edit_private_posts";b:1;s:17:"edit_others_posts";b:1;s:17:"edit_others_pages";b:1;s:13:"publish_posts";b:1;s:13:"publish_pages";b:1;s:12:"delete_posts";b:1;s:12:"delete_pages";b:1;s:20:"delete_private_pages";b:1;s:20:"delete_private_posts";b:1;s:22:"delete_published_pages";b:1;s:22:"delete_published_posts";b:1;s:19:"delete_others_posts";b:1;s:19:"delete_others_pages";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:17:"moderate_comments";b:1;s:12:"upload_files";b:1;s:6:"export";b:1;s:6:"import";b:1;s:10:"list_users";b:1;s:18:"manage_woocommerce";b:1;s:24:"view_woocommerce_reports";b:1;s:12:"edit_product";b:1;s:12:"read_product";b:1;s:14:"delete_product";b:1;s:13:"edit_products";b:1;s:20:"edit_others_products";b:1;s:16:"publish_products";b:1;s:21:"read_private_products";b:1;s:15:"delete_products";b:1;s:23:"delete_private_products";b:1;s:25:"delete_published_products";b:1;s:22:"delete_others_products";b:1;s:21:"edit_private_products";b:1;s:23:"edit_published_products";b:1;s:20:"manage_product_terms";b:1;s:18:"edit_product_terms";b:1;s:20:"delete_product_terms";b:1;s:20:"assign_product_terms";b:1;s:15:"edit_shop_order";b:1;s:15:"read_shop_order";b:1;s:17:"delete_shop_order";b:1;s:16:"edit_shop_orders";b:1;s:23:"edit_others_shop_orders";b:1;s:19:"publish_shop_orders";b:1;s:24:"read_private_shop_orders";b:1;s:18:"delete_shop_orders";b:1;s:26:"delete_private_shop_orders";b:1;s:28:"delete_published_shop_orders";b:1;s:25:"delete_others_shop_orders";b:1;s:24:"edit_private_shop_orders";b:1;s:26:"edit_published_shop_orders";b:1;s:23:"manage_shop_order_terms";b:1;s:21:"edit_shop_order_terms";b:1;s:23:"delete_shop_order_terms";b:1;s:23:"assign_shop_order_terms";b:1;s:16:"edit_shop_coupon";b:1;s:16:"read_shop_coupon";b:1;s:18:"delete_shop_coupon";b:1;s:17:"edit_shop_coupons";b:1;s:24:"edit_others_shop_coupons";b:1;s:20:"publish_shop_coupons";b:1;s:25:"read_private_shop_coupons";b:1;s:19:"delete_shop_coupons";b:1;s:27:"delete_private_shop_coupons";b:1;s:29:"delete_published_shop_coupons";b:1;s:26:"delete_others_shop_coupons";b:1;s:25:"edit_private_shop_coupons";b:1;s:27:"edit_published_shop_coupons";b:1;s:24:"manage_shop_coupon_terms";b:1;s:22:"edit_shop_coupon_terms";b:1;s:24:"delete_shop_coupon_terms";b:1;s:24:"assign_shop_coupon_terms";b:1;s:17:"edit_shop_webhook";b:1;s:17:"read_shop_webhook";b:1;s:19:"delete_shop_webhook";b:1;s:18:"edit_shop_webhooks";b:1;s:25:"edit_others_shop_webhooks";b:1;s:21:"publish_shop_webhooks";b:1;s:26:"read_private_shop_webhooks";b:1;s:20:"delete_shop_webhooks";b:1;s:28:"delete_private_shopublished_shop_coupons";b:1;s:26:"delete_others_shop_coupons";b:1;s:25:"edit_private_shop_coupons";b:1;s:27:"edit_published_shop_coupons";b:1;s:24:"manage_shop_coupon_terms";b:1;s:22:"edit_shop_coupon_terms";b:1;s:24:"delete_shop_coupon_terms";b:1;s:24:"assign_shop_coupon_terms";b:1;s:17:"edit_shop_webhook";b:1;s:17:"read_shop_webhook";b:1;s:19:"delete_shop_webhook";b:1;s:18:"edit_shop_webhooks";b:1;s:25:"edit_others_shop_webhooks";b:1;s:21:"publish_shop_webhooks";b:1;s:26:"read_private_shop_webhooks";b:1;s:20:"delete_shop_webhooks";b:1;s:28:"delete_private_shop_webhooks";b:1;s:30:"delete_published_shop_webhooks";b:1;s:27:"delete_others_shop_webhooks";b:1;s:26:"edit_private_shop_webhooks";b:1;s:28:"edit_published_shop_webhooks";b:1;s:25:"manage_shop_webhook_terms";b:1;s:23:"edit_shop_webhook_terms";b:1;s:25:"delete_shop_webhook_terms";b:1;s:25:"assign_shop_webhook_terms";b:1;s:22:"edit_klaviyo_shop_cart";b:1;s:22:"read_klaviyo_shop_cart";b:1;s:24:"delete_klaviyo_shop_cart";b:1;s:23:"edit_klaviyo_shop_carts";b:1;s:30:"edit_others_klaviyo_shop_carts";b:1;s:26:"publish_klaviyo_shop_carts";b:1;s:31:"read_private_klaviyo_shop_carts";b:1;s:25:"delete_klaviyo_shop_carts";b:1;s:33:"delete_private_klaviyo_shop_carts";b:1;s:35:"delete_published_klaviyo_shop_carts";b:1;s:32:"delete_others_klaviyo_shop_carts";b:1;s:31:"edit_private_klaviyo_shop_carts";b:1;s:33:"edit_published_klaviyo_shop_carts";b:1;s:30:"manage_klaviyo_shop_cart_terms";b:1;s:28:"edit_klaviyo_shop_cart_terms";b:1;s:30:"delete_klaviyo_shop_cart_terms";b:1;s:30:"assign_klaviyo_shop_cart_terms";b:1;}}s:13:"wpseo_manager";a:2:{s:4:"name";s:11:"SEO Manager";s:12:"capabilities";a:46:{s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;s:24:"manage_events_categories";b:1;s:7:"nextend";b:1;s:14:"nextend_config";b:1;s:19:"nextend_visual_edit";b:1;s:21:"nextend_visual_delete";b:1;s:11:"smartslider";b:1;s:18:"smartslider_config";b:1;s:16:"smartslider_edit";b:1;s:18:"smartslider_delete";b:1;s:15:"wpseo_bulk_edit";b:1;s:28:"wpseo_edit_advanced_metadata";b:1;s:20:"wpseo_manage_options";b:1;}}s:12:"wpseo_editor";a:2:{s:4:"name";s:10:"SEO Editor";s:12:"capabilities";a:45:{s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;s:24:"manage_events_categories";b:1;s:7:"nextend";b:1;s:14:"nextend_config";b:1;s:19:"nextend_visual_edit";b:1;s:21:"nextend_visual_delete";b:1;s:11:"smartslider";b:1;s:18:"smartslider_config";b:1;s:16:"smartslider_edit";b:1;s:18:"smartslider_delete";b:1;s:15:"wpseo_bulk_edit";b:1;s:28:"wpseo_edit_advanced_metadata";b:1;}}s:14:"backwpup_admin";a:2:{s:4:"name";s:14:"BackWPup Admin";s:12:"capabilities";a:11:{s:4:"read";b:1;s:8:"backwpup";b:1;s:13:"backwpup_jobs";b:1;s:18:"backwpup_jobs_edit";b:1;s:19:"backwpup_jobs_start";b:1;s:16:"backwpup_backups";b:1;s:25:"backwpup_backups_download";b:1;s:23:"backwpup_backups_delete";b:1;s:13:"backwpup_logs";b:1;s:20:"backwpup_logs_delete";b:1;s:17:"backwpup_settings";b:1;}}s:14:"backwpup_check";a:2:{s:4:"name";s:21:"BackWPup jobs checker";s:12:"capabilities";a:11:{s:4:"read";b:1;s:8:"backwpup";b:1;s:13:"backwpup_jobs";b:1;s:18:"backwpup_jobs_edit";b:0;s:19:"backwpup_jobs_start";b:0;s:16:"backwpup_backups";b:1;s:25:"backwpup_backups_download";b:0;s:23:"backwpup_backups_delete";b:0;s:13:"backwpup_logs";b:1;s:20:"backwpup_logs_delete";b:0;s:17:"backwpup
I didn’t post the complete value before as I am sure you understand it is pretty long, and I wasn’t sure if it was relevant. But here you are.
The option_value you pasted seems not complete as it should ends with curly braces. Could you copy the whole content into a notepad and search if you could find the keyword ’employee’?
And do you have a backup copy of the original functions.php of the child theme? Try reverting the codes and see if it resolve the issue.
I have just double checked, and that is 100% exactly the same as what is in my option_value. I have just copied it directly from the option_value in my database to Sublime Text and done a search and there is no reference of the word employee.
I have backed up my functions.php, removed all the functions inside my child themes functions.php, cleared the cache in CloudFlare, reloaded the website. And there is no change. The errors are still sitting at the top of the page preventing my WordPress ToolBar from appearing.
I also tried earlier creating a function to remove the employee role. Which again did nothing.
- The topic ‘After updating to WordPress 4.9.7, I am having major problems with User Roles!’ is closed to new replies.