1

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.

enter image description here

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

2 Answers 2

2

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 CiviCRM: access Ajax API permission, if not try assigning those permission to both anonymous and authenticated user role?

4
  • 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?
    – Juggy69
    Dec 11, 2021 at 9:48
  • I have also updated the main question with GitHub link to see debug log errors
    – Juggy69
    Dec 11, 2021 at 11:39
  • Sorry the link is broken Dec 11, 2021 at 11:53
  • Sorry edited the visibility of the repository
    – Juggy69
    Dec 11, 2021 at 12:12
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 hereUser role editor image below

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.