Answers.Body: <p>So after messing with the WordPress Plugin User Role Editor and going through the Access permission controls again it now looks to be working with the following in Access Permissions</p>
  <p>CiviCRM: access uploaded files<br>
  CiviCRM: profile create <br>
  CiviCRM: profile edit <br>
  CiviCRM: profile view<br>
  CiviCRM: access all custom data<br>
  CiviCRM: access AJAX API<br>
  CiviEvent: register for events<br>
  CiviEvent: view event info<br>
  CiviContribute: make online contributions<br>
  CiviMail: access CiviMail subscribe/unsubscribe pages<br>
  CiviCampaign: sign CiviCRM Petition<br>
  CiviVolunteer: register to volunteer</p>
  <p>In the <a href="https://i.sstatic.net/0clfN.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/0clfN.png" alt="enter image description here" /></a>User role editor image below</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-11T12:47:20.233Z
Answers.LastActivityDate: 2021-12-11T13:11:16.803Z
Answers.LastEditDate: 2021-12-11T13:11:16.803Z
Answers.UserDisplayName: Juggy69
Answers.Body: <p>Juggy69 Welcome to CiviCRM SE. Since you are using stripe as payment gateway for taking payment can you please check if Anonymous and Authenticated users have <code>CiviCRM: access Ajax API</code> permission, if not try assigning those permission to both anonymous and authenticated user role?</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-11T09:48:52.420Z
Answers.Text: Hi Pradeep, I have had the donations working before and had a permission issue with 5.42.0 and sorted that, so I have enabled Ajax API to all users and as soon as I load the contribution page I get the same screen as the image above?
Answers.UserDisplayName: Juggy69
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-11T11:39:51.900Z
Answers.Text: I have also updated the main question with GitHub link to see debug log errors
Answers.UserDisplayName: Juggy69
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-11T11:53:27.313Z
Answers.Text: Sorry the link is broken
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-11T12:12:54.880Z
Answers.Text: Sorry edited the visibility of the repository
Answers.UserDisplayName: Juggy69
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-11T00:17:05.500Z
Answers.LastActivityDate: 2021-12-11T00:17:05.500Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>WP Version 5.8.2
  CiviCRM Version 5.44.0</p>
  <p>When trying to make a contribution when not logged in or in a private browser I get the following error sometimes on page load but more often after pressing the contribute button.</p>
  <p><a href="https://i.sstatic.net/I9zcM.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/I9zcM.png" alt="enter image description here" /></a></p>
  <p>Using administer - users and permissions - permissions, I have set the following for the Anonymous User</p>
  <p>CiviCRM: access uploaded files <br>
  CiviCRM: profile create<br>
  CiviCRM: profile edit<br>
  CiviCRM: profile view<br>
  CiviCRM: access all custom data<br>
  CiviEvent: register for events<br>
  CiviEvent: view event info<br>
  CiviContribute: make online contributions<br>
  CiviMail: access CiviMail subscribe/unsubscribe pages<br>
  CiviCampaign: sign CiviCRM Petition<br>
  CiviVolunteer: register to volunteer<br></p>
  <p>I also receive an email with the following info</p>
  <pre><code>***ERROR***
  </code></pre>
  <p>message:            You do not have permission to access this page.
  code:<br />
  exception:          CRM_Core_Exception Object
  (
  [errorData:CRM_Core_Exception:private] =&gt; Array
  (
  [error_code] =&gt; 0
  )</p>
  <pre><code>[cause:protected] =&gt; 
  [_trace:PEAR_Exception:private] =&gt; 
  [message:protected] =&gt; You do not have permission to access this page.
  [string:Exception:private] =&gt; 
  [code:protected] =&gt; 0
  [file:protected] =&gt; /public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php
  [line:protected] =&gt; 605
  [trace:Exception:private] =&gt; Array
      (
          [0] =&gt; Array
              (
                  [file] =&gt; /public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php
                  [line] =&gt; 60
                  [function] =&gt; permissionDenied
                  [class] =&gt; CRM_Utils_System_WordPress
                  [type] =&gt; -&gt;
                  [args] =&gt; Array
                      (
                      )
  
              )
  
          [1] =&gt; Array
              (
                  [file] =&gt; /public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php
                  [line] =&gt; 233
                  [function] =&gt; __callStatic
                  [class] =&gt; CRM_Utils_System
                  [type] =&gt; ::
                  [args] =&gt; Array
                      (
                          [0] =&gt; permissionDenied
                          [1] =&gt; Array
                              (
                              )
  
                      )
  
              )
  
          [2] =&gt; Array
              (
                  [file] =&gt; /public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php
                  [line] =&gt; 69
                  [function] =&gt; runItem
                  [class] =&gt; CRM_Core_Invoke
                  [type] =&gt; ::
                  [args] =&gt; Array
  </code></pre>
  <p>I have also disabled all WP plugin except for CiviCRM and still get the error, any help / advise appreciated thanks in advance.</p>
  <p>Cheers</p>
  <p>Stuart</p>
  <p>Update
  <a href="https://github.com/JENetworkLtd/CIVICRM-Errors/blob/main/Debug" rel="nofollow noreferrer">Github Debug Info</a></p>
  
Tags: <wordpress><civicontribute><contributions><contribution-page>
Title: You do not have permission to access this page - Contribution Page - WordPress Install
ThreadText: # You do not have permission to access this page - Contribution Page - WordPress Install
  
  (Asked by: username_0 on 2021-12-10)
  
  WP Version 5.8.2
  CiviCRM Version 5.44.0
  When trying to make a contribution when not logged in or in a private browser I get the following error sometimes on page load but more often after pressing the contribute button.
  
  Using administer - users and permissions - permissions, I have set the following for the Anonymous User
  CiviCRM: access uploaded files 
  CiviCRM: profile create
  CiviCRM: profile edit
  CiviCRM: profile view
  CiviCRM: access all custom data
  CiviEvent: register for events
  CiviEvent: view event info
  CiviContribute: make online contributions
  CiviMail: access CiviMail subscribe/unsubscribe pages
  CiviCampaign: sign CiviCRM Petition
  CiviVolunteer: register to volunteer
  I also receive an email with the following info
  ***ERROR***
  
  message:            You do not have permission to access this page.
  code:
  exception:          CRM_Core_Exception Object
  (
  [errorData:CRM_Core_Exception:private] => Array
  (
  [error_code] => 0
  )
  [cause:protected] => 
  [_trace:PEAR_Exception:private] => 
  [message:protected] => You do not have permission to access this page.
  [string:Exception:private] => 
  [code:protected] => 0
  [file:protected] => /public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php
  [line:protected] => 605
  [trace:Exception:private] => Array
      (
          [0] => Array
              (
                  [file] => /public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php
                  [line] => 60
                  [function] => permissionDenied
                  [class] => CRM_Utils_System_WordPress
                  [type] => ->
                  [args] => Array
                      (
                      )
  
              )
  
          [1] => Array
              (
                  [file] => /public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php
                  [line] => 233
                  [function] => __callStatic
                  [class] => CRM_Utils_System
                  [type] => ::
                  [args] => Array
                      (
                          [0] => permissionDenied
                          [1] => Array
                              (
                              )
  
                      )
  
              )
  
          [2] => Array
              (
                  [file] => /public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php
                  [line] => 69
                  [function] => runItem
                  [class] => CRM_Core_Invoke
                  [type] => ::
                  [args] => Array
  
  I have also disabled all WP plugin except for CiviCRM and still get the error, any help / advise appreciated thanks in advance.
  Cheers
  Stuart
  Update
  Github Debug Info
  
  **Tags:** wordpress, civicontribute, contributions, contribution-page
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2021-12-11. Score: 2
  
  So after messing with the WordPress Plugin User Role Editor and going through the Access permission controls again it now looks to be working with the following in Access Permissions
  
  CiviCRM: access uploaded files  
  CiviCRM: profile create   
  CiviCRM: profile edit   
  CiviCRM: profile view  
  CiviCRM: access all custom data  
  CiviCRM: access AJAX API  
  CiviEvent: register for events  
  CiviEvent: view event info  
  CiviContribute: make online contributions  
  CiviMail: access CiviMail subscribe/unsubscribe pages  
  CiviCampaign: sign CiviCRM Petition  
  CiviVolunteer: register to volunteer
  
  In the [![enter image description here](https://i.sstatic.net/0clfN.png)](https://i.sstatic.net/0clfN.png)User role editor image below
  
  
  ---
  
  ### Answer by username_1 on 2021-12-11. Score: 0
  
  username_0 Welcome to CiviCRM SE. Since you are using stripe as payment gateway for taking payment can you please check if Anonymous and Authenticated users have `CiviCRM: access Ajax API` permission, if not try assigning those permission to both anonymous and authenticated user role?
  
  > **Comments:**
  > **username_0**: Hi Pradeep, I have had the donations working before and had a permission issue with 5.42.0 and sorted that, so I have enabled Ajax API to all users and as soon as I load the contribution page I get the same screen as the image above?  
  > **username_0**: I have also updated the main question with GitHub link to see debug log errors  
  > **username_1**: Sorry the link is broken  
  > **username_0**: Sorry edited the visibility of the repository  
  
  ---
  
  