Title: Error when Testing New User Role
Last modified: November 19, 2022

---

# Error when Testing New User Role

 *  Resolved [alexWP333](https://wordpress.org/support/users/alexwp333/)
 * (@alexwp333)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error-when-testing-new-user-role/)
 * Hello,
 * I’m running WordPress 6.1.1, and using PHP 7.4.
 * I’ve installed PublishPress’s Capabilities and Permissions plugins, and have 
   followed the instructions on setting up roles as per this youtube video ([https://www.youtube.com/watch?v=YmNLROw_EUE&t=320s](https://www.youtube.com/watch?v=YmNLROw_EUE&t=320s)).
 * I’ve added a new user, created a new role for that user, and am now ready to 
   test the environment that this new user will see. When I click on the “Test this
   user” link, that’s directly underneath the new user that I’ve added, I get this
   error message:
 * `Fatal error: Uncaught Error: Call to undefined function wc_empty_cart() in /
   home/customer/www/sevenfold.school/public_html/wp-content/plugins/woocommerce/
   includes/class-wc-session-handler.php:372 Stack trace: #0 /home/customer/www/
   sevenfold.school/public_html/wp-content/plugins/woocommerce/includes/class-wc-
   session-handler.php(363): WC_Session_Handler->forget_session() #1 /home/customer/
   www/sevenfold.school/public_html/wp-content/plugins/woocommerce/includes/class-
   wc-session-handler.php(99): WC_Session_Handler->destroy_session() #2 /home/customer/
   www/sevenfold.school/public_html/wp-content/plugins/woocommerce/includes/class-
   wc-session-handler.php(71): WC_Session_Handler->init_session_cookie() #3 /home/
   customer/www/sevenfold.school/public_html/wp-content/plugins/woocommerce/includes/
   class-woocommerce.php(862): WC_Session_Handler->init() #4 /home/customer/www/
   sevenfold.school/public_html/wp-content/plugins/woocommerce-payments/includes/
   class-wc-payments-fraud-service.php(131): WooCommerce->initialize_session() #
   5 /home/cust in /home/customer/www/sevenfold.school/public_html/wp-content/plugins/
   woocommerce/includes/class-wc-session-handler.php on line 372`
 * Can someone tell me what this error means, and what I need to do to fix this 
   error?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-when-testing-new-user-role%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/error-when-testing-new-user-role/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/error-when-testing-new-user-role/page/2/?output_format=md)

 *  Thread Starter [alexWP333](https://wordpress.org/support/users/alexwp333/)
 * (@alexwp333)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error-when-testing-new-user-role/#post-16216803)
 * I noticed that the “woocommerce” plugin was included in the error message, so
   I decided to temporarily disable this woocommerce plugin.
 * Now, after I login as the Administrator, when I click on the “Test this user”
   link under the new user that I’ve added, instead of getting the error message
   that I got before I get an alert that reads: “Sorry, you are not allowed to access
   this page.”
 * I then clicked back and forth a bit, and then noticed that the new user’s name
   appeared on the upper right corner, which seems to indicate that I’m seeing backend
   environment that this new user would be seeing.
 * In the user’s left sidebar the only options are:
    1.) Media 2.) Pages 3.) and
   Contact
 * When I click on the Pages tab of this left sidebar I then see a list **all** 
   of the site’s webpages, instead of just the specific **single** webpage that 
   I indicated (through PublishPress) to be accessible to this new user.
 * In addition to this I see that I am unable to make any changes to any of the 
   webpages listed, as the page editing field appears blank. However, I also see
   that I’m unable to make any changes to the
    specific webpage that I indicated(
   through PublishPress) to be accessible to the new user. The page editing field
   for this particular webpage also appears blank.
 * Why, when I test the new user’s backend environment, am I unable to make any 
   changes to the webpage that I made accessible to the new user through PublishPress?
 *  Plugin Support [Riza Maulana Ardiyanto](https://wordpress.org/support/users/rizaardiyanto/)
 * (@rizaardiyanto)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error-when-testing-new-user-role/#post-16217750)
 * Hi [@alexwp333](https://wordpress.org/support/users/alexwp333/)
 * Could you please try this guidance: [https://publishpress.com/knowledge-base/wordpress-admin-area-access-for-woocommerce-users/](https://publishpress.com/knowledge-base/wordpress-admin-area-access-for-woocommerce-users/)?
 * Thanks,
 *  Thread Starter [alexWP333](https://wordpress.org/support/users/alexwp333/)
 * (@alexwp333)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error-when-testing-new-user-role/#post-16220872)
 * Thank you Riza,
 * I’ve deactivated woocommenrce altogether, so my primary question right now has
   to do with not being able to make any changes to the webpage that I made accessible
   to the new user through PublishPress.
 * Here are my current settings:
 * Users: Newly created role name appears correctly under the new user’s Roles column
   
   Capabilities > Roles: shows role name and 1 user, the user that I assigned Capabilities
   > Capabilities > Editing tab: Pages checkboxes are all checked Permissions > 
   Groups: says “Edit Page (2), Read Page (1)” Specific Permissions > Read-Pages-
   Enabled: checkbox is currently unchecked Specific Permissions > Edit-Pages-Blocked:
   checkbox is currently unchecked
 * I changed the Edit-Pages-Blocked to Edit-Pages-Enabled, and am still getting 
   a blank Edit Page field when logged in as the new user, and select the Classic
   Editor option for the particular webpage assigned to this user.
 * When I review the Specific Permissions page again it appears as follows:
    Read-
   Pages-Enabled: checkbox next to webpage name is currently unchecked Edit-Pages-
   Blocked: checkbox next to webpage (with asterisk*) name is currently unchecked
   Edit-Pages-Enabled: checkbox next to webpage name is currently unchecked
 * The way that these settings are displayed is somewhat confusing.
 * Question #1: Why are the two different states (Blocked AND Enabled) showing up
   under the Edit-Pages?
 * Question #2: How can I fix the settings so that the new user is able to access
   an editable (not blank) Edit Page field?
 *  Plugin Support [Riza Maulana Ardiyanto](https://wordpress.org/support/users/rizaardiyanto/)
 * (@rizaardiyanto)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error-when-testing-new-user-role/#post-16221643)
 * Hi [@alexwp333](https://wordpress.org/support/users/alexwp333/)
 * You have really long description text. Please attach some screenshots on how 
   it behaves now, and how do you want it to behave. If there is a loom video recording,
   it will be better so we can understand your issue much better on your case.
 *  Thread Starter [alexWP333](https://wordpress.org/support/users/alexwp333/)
 * (@alexwp333)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error-when-testing-new-user-role/#post-16257884)
 * Thanks Riza,
 * I have taken a number of screenshots, and am now ready to share them here. Unfortunately
   I don’t see any kind of Add Media button as I’m typing in this new post. Right
   now, I only see a row of icons bthat only allow me to format the text.
 * Can you please provide me with instructions on how to attach my screenshots?
 * Thanks again,
    Alex
 *  Plugin Support [Riza Maulana Ardiyanto](https://wordpress.org/support/users/rizaardiyanto/)
 * (@rizaardiyanto)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error-when-testing-new-user-role/#post-16260592)
 * Hi Alex,
 * You can attach the screenshot on image hosted service such as [https://imgur.com/](https://imgur.com/)
   or you can also use Google Drive instead.
 * Thanks,
 *  Thread Starter [alexWP333](https://wordpress.org/support/users/alexwp333/)
 * (@alexwp333)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error-when-testing-new-user-role/#post-16261156)
 * Hi Riza,
 * Here’s the link to the screenshots on Google Drive:
    [https://drive.google.com/drive/folders/1fsvSe66gHDFZN1xztTAS_KIz8ZIVhzpf](https://drive.google.com/drive/folders/1fsvSe66gHDFZN1xztTAS_KIz8ZIVhzpf)
 * These screenshots illustrate the problem I’m having, and I’ve included brief 
   notes in the filenames. I’ve also included screenshots of my current PublishPress
   settings.
 * As far as how I want PublishPress to behave, I want it to work in the same way
   that’s shown in this PublishPress video ([https://www.youtube.com/watch?v=YmNLROw_EUE&t=320s](https://www.youtube.com/watch?v=YmNLROw_EUE&t=320s)).
 * I hope all of this helps you to troubleshoot things.
 * Let me know if you need additional screenshots.
 * Thanks.
    -  This reply was modified 3 years, 6 months ago by [alexWP333](https://wordpress.org/support/users/alexwp333/).
 *  Plugin Support [Riza Maulana Ardiyanto](https://wordpress.org/support/users/rizaardiyanto/)
 * (@rizaardiyanto)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error-when-testing-new-user-role/#post-16261458)
 * Is it currently enabled: [https://i.imgur.com/9sNB1ji.png](https://i.imgur.com/9sNB1ji.png)?
 *  Thread Starter [alexWP333](https://wordpress.org/support/users/alexwp333/)
 * (@alexwp333)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error-when-testing-new-user-role/#post-16262873)
 * Thanks Riza,
 * None of the three items that you indicated in your screenshot were enabled.
 * I just now enabled the _export_, _import_ and _read_ items (under The Admin Capability
   Name) as shown in your screenshot. I clicked on the corresponding check boxes
   and then clicked Save.
 * After doing that, I logged in as Charlotte. But when I go to the **Student Portfolio**
   page I still get the same blank screen as shown in the _“09 — This particular
   Edit Page screen . . .”_ screenshot that I uploaded to the same Google drive 
   folder.
 * Are there any other settings that I need to change to make it work?
 *  Plugin Support [Riza Maulana Ardiyanto](https://wordpress.org/support/users/rizaardiyanto/)
 * (@rizaardiyanto)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error-when-testing-new-user-role/#post-16263269)
 * Does the blank issue happen on “09 — This particular Edit Page screen . . .” 
   only?
 * Does on /wp-admin you can access it just fine?
 *  Thread Starter [alexWP333](https://wordpress.org/support/users/alexwp333/)
 * (@alexwp333)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error-when-testing-new-user-role/#post-16263327)
 * Hello Riza,
 * The blank field seems to happen to _all_ of the pages, not just the “09” page.
   I’ve uploaded seven more screenshots to the same google drive folder, and I numbered
   these new screenshots 10 through 16 ([https://drive.google.com/drive/folders/1fsvSe66gHDFZN1xztTAS_KIz8ZIVhzpf](https://drive.google.com/drive/folders/1fsvSe66gHDFZN1xztTAS_KIz8ZIVhzpf)).
 * I’m fine with having these two other webpages (shown in screenshots 14 and 15)
   be blank because I don’t want Charlotte to be able to make edits to these two
   other pages.
 * However I _do_ want Charlotte to be able to make edits to the “Student Portfolios”
   webpage (shown in screenshot 16), so the fact that this particular webpage is
   also blank becomes an issue.
 *  Plugin Support [Riza Maulana Ardiyanto](https://wordpress.org/support/users/rizaardiyanto/)
 * (@rizaardiyanto)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error-when-testing-new-user-role/#post-16263502)
 * It seems the box that missing is from Avia layout builder?
 *  Thread Starter [alexWP333](https://wordpress.org/support/users/alexwp333/)
 * (@alexwp333)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error-when-testing-new-user-role/#post-16264702)
 * That’s correct.
 * I’ve uploaded five more screenshots to the same google drive folder, and I numbered
   these new screenshots 17 through 21 ([https://drive.google.com/drive/folders/1fsvSe66gHDFZN1xztTAS_KIz8ZIVhzpf](https://drive.google.com/drive/folders/1fsvSe66gHDFZN1xztTAS_KIz8ZIVhzpf)).
 * As before I login as Charlotte, with the expectation that I will be able to edit
   the “Student Portfolios” page, and _only_ that page.
 * Here is a description of the five new screenshots:
 * _Screenshot 17_ shows the options for editing the “Student Portfolios” page. 
   I select the Classic Editor option.
 * _Screenshot 18_ shows the Edit Page options for the “Student Portfolios” page.
   I select the Default Editor option (not the Avia option). The editing field is
   still blank.
 * _Screenshot 19_ shows what the Edit Page looks like when I select the Block Editor
   option for the “Student Portfolios” page. This includes a lot of Avia shortcodes
   in brackets, and Charlotte won’t be able to work with this format, because the
   Avia brackets will confuse her.
 * _Screenshot 20_ shows the Edit Page options for the _“Instructor Bios”_ page.
   I select the Default Editor option (not the Avia option). Editing field is still
   blank.
 * _Screenshot 21_ shows what the Edit Page looks like when I select the Block Editor
   option for the _“Instructor Bios”_ page. I haven’t allowed Charlotte access to
   edit this “Instructor Bios” page in PublishPress, so I don’t know why it displays
   the content for this page as if it’s ready to be edited.
 *  Plugin Support [Riza Maulana Ardiyanto](https://wordpress.org/support/users/rizaardiyanto/)
 * (@rizaardiyanto)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error-when-testing-new-user-role/#post-16267548)
 * This issue seems to come from Avia layout builder. There is a user that reported
   the same: [https://wordpress.org/support/topic/cannot-see-content-in-page-editor/](https://wordpress.org/support/topic/cannot-see-content-in-page-editor/)
 *  Thread Starter [alexWP333](https://wordpress.org/support/users/alexwp333/)
 * (@alexwp333)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error-when-testing-new-user-role/#post-16268134)
 * I’ve been using the Avia on my website with dozens of different wordpress plugins
   over the years with no issues.
 * Do the PublishPress plugin developers have any upcoming plans to find out why
   their plugin isn’t working well with Avia?

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/error-when-testing-new-user-role/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/error-when-testing-new-user-role/page/2/?output_format=md)

The topic ‘Error when Testing New User Role’ is closed to new replies.

 * ![](https://ps.w.org/capability-manager-enhanced/assets/icon-256x256.png?rev=
   3408171)
 * [PublishPress Capabilities - User Role Editor, Access Permissions, User Capabilities, Admin Menus](https://wordpress.org/plugins/capability-manager-enhanced/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/capability-manager-enhanced/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/capability-manager-enhanced/)
 * [Active Topics](https://wordpress.org/support/plugin/capability-manager-enhanced/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/capability-manager-enhanced/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/capability-manager-enhanced/reviews/)

 * 18 replies
 * 3 participants
 * Last reply from: [Steve Burge](https://wordpress.org/support/users/stevejburge/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/error-when-testing-new-user-role/page/2/#post-16271816)
 * Status: resolved