Answers.Body: <p>Ok, thanks a lot Demerit but I could not get what I should do in there and finally found the solution. </p>
  
  <p>So the trick was with the capabilities. 
  I installed user role editor and found out that by default, a subscriber is granted way more capabilities than just "read", which are : </p>
  
  <pre><code>access_all_custom_data
  access_civimail_subscribe_unsubscribe_pages
  access_uploaded_files
  make_online_contributions
  profile_create
  profile_edit
  profile_listings
  profile_view
  read
  register_for_events
  sign_civicrm_petition
  view_event_info
  view_public_civimail_content
  </code></pre>
  
  <p>So basicaly if your custom roles are not granted those capabilities, users will get denied the access to some civi page at some point. </p>
  
  <p>So in wordpress I just went Users > User role Editor and updated my custom roles with the right capabilities.</p>
  
  <p>Hope it helps !</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-23T20:55:22.010Z
Answers.LastActivityDate: 2019-09-23T20:55:22.010Z
Answers.UserDisplayName: Tuto
Answers.Body: <p>Go to <a href="https://your-site/wp-admin/admin.php?page=CiviCRM&amp;q=civicrm%2Fadmin%2Faccess%2Fwp-permissions&amp;reset=1" rel="nofollow noreferrer">https://your-site/wp-admin/admin.php?page=CiviCRM&amp;q=civicrm%2Fadmin%2Faccess%2Fwp-permissions&amp;reset=1</a></p>
  
  <p>You can also get there from under administer - users and permissions - permissions, and then on that page there's the link to wordpress access control.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-22T23:57:35.957Z
Answers.LastActivityDate: 2019-09-22T23:57:35.957Z
Answers.UserDisplayName: Demerit
Body: <p>I let my users register on my wordpress website using a contribution page on CiviCRM. It used to work fine but last time I tried to register a new user, instead of the thank you page, I get this access denied message :</p>
  
  <p><a href="https://i.sstatic.net/ZNBEl.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ZNBEl.png" alt="Access denied picture"></a></p>
  
  <p>" Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred. 
  You do not have permission to access this page.
  Return to home page."</p>
  
  <p>After hours of investigation, I finally found out the problem came after I changed the default role for new subscribers to a custom role I had added from my function.php called "Pending". If I turn it back to "Subcribers" then it works fine again.</p>
  
  <p>Do you have any idea how I could grant access to this page to users with "Pending" role ??</p>
  
  <p>Thanks a lot !</p>
  
  <p>Here is the log :</p>
  
  <pre><code>Sep 22 19:33:21  [info] $Fatal Error Details = Array
  (
      [message] =&gt; You do not have permission to access this page.
      [code] =&gt; 
  )
  
  
      Sep 22 19:33:21  [info] $backTrace = #0 /home/gemmemedxe/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(385): CRM_Core_Error::backtrace("backTrace", TRUE)
      #1 /home/gemmemedxe/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php(397): CRM_Core_Error::fatal("You do not have permission to access this page.")
      #2 /home/gemmemedxe/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php(76): CRM_Utils_System_WordPress-&gt;permissionDenied()
      #3 /home/gemmemedxe/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(231): CRM_Utils_System::__callStatic("permissionDenied", (Array:0))
      #4 /home/gemmemedxe/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(85): CRM_Core_Invoke::runItem((Array:15))
      #5 /home/gemmemedxe/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
      #6 /home/gemmemedxe/www/wp-content/plugins/civicrm/civicrm.php(1392): CRM_Core_Invoke::invoke((Array:3))
      #7 /home/gemmemedxe/www/wp-content/plugins/civicrm/includes/civicrm.basepage.php(365): CiviCRM_For_WordPress-&gt;invoke()
      #8 /home/gemmemedxe/www/wp-includes/class-wp-hook.php(286): CiviCRM_For_WordPress_Basepage-&gt;basepage_handler(Object(WP))
      #9 /home/gemmemedxe/www/wp-includes/class-wp-hook.php(310): WP_Hook-&gt;apply_filters(NULL, (Array:1))
      #10 /home/gemmemedxe/www/wp-includes/plugin.php(531): WP_Hook-&gt;do_action((Array:1))
      #11 /home/gemmemedxe/www/wp-includes/class-wp.php(750): do_action_ref_array("wp", (Array:1))
      #12 /home/gemmemedxe/www/wp-includes/functions.php(1105): WP-&gt;main("")
      #13 /home/gemmemedxe/www/wp-blog-header.php(16): wp()
      #14 /home/gemmemedxe/www/index.php(17): require("/home/gemmemedxe/www/wp-blog-header.php")
      #15 {main}
  </code></pre>
  
Tags: <contribution-page><registration><roles>
Title: Access denied after contribution (thank you page denied)
ThreadText: # Access denied after contribution (thank you page denied)
  
  (Asked by: username_0 on 2019-09-22)
  
  I let my users register on my wordpress website using a contribution page on CiviCRM. It used to work fine but last time I tried to register a new user, instead of the thank you page, I get this access denied message :
  
  [![Access denied picture](https://i.sstatic.net/ZNBEl.png)](https://i.sstatic.net/ZNBEl.png)
  
  " Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
  You do not have permission to access this page.
  Return to home page."
  
  After hours of investigation, I finally found out the problem came after I changed the default role for new subscribers to a custom role I had added from my function.php called "Pending". If I turn it back to "Subcribers" then it works fine again.
  
  Do you have any idea how I could grant access to this page to users with "Pending" role ??
  
  Thanks a lot !
  
  Here is the log :
  
  ```
  Sep 22 19:33:21  [info] $Fatal Error Details = Array
  (
      [message] => You do not have permission to access this page.
      [code] => 
  )
  
      Sep 22 19:33:21  [info] $backTrace = #0 /home/gemmemedxe/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(385): CRM_Core_Error::backtrace("backTrace", TRUE)
      #1 /home/gemmemedxe/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php(397): CRM_Core_Error::fatal("You do not have permission to access this page.")
      #2 /home/gemmemedxe/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php(76): CRM_Utils_System_WordPress->permissionDenied()
      #3 /home/gemmemedxe/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(231): CRM_Utils_System::__callStatic("permissionDenied", (Array:0))
      #4 /home/gemmemedxe/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(85): CRM_Core_Invoke::runItem((Array:15))
      #5 /home/gemmemedxe/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
      #6 /home/gemmemedxe/www/wp-content/plugins/civicrm/civicrm.php(1392): CRM_Core_Invoke::invoke((Array:3))
      #7 /home/gemmemedxe/www/wp-content/plugins/civicrm/includes/civicrm.basepage.php(365): CiviCRM_For_WordPress->invoke()
      #8 /home/gemmemedxe/www/wp-includes/class-wp-hook.php(286): CiviCRM_For_WordPress_Basepage->basepage_handler(Object(WP))
      #9 /home/gemmemedxe/www/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, (Array:1))
      #10 /home/gemmemedxe/www/wp-includes/plugin.php(531): WP_Hook->do_action((Array:1))
      #11 /home/gemmemedxe/www/wp-includes/class-wp.php(750): do_action_ref_array("wp", (Array:1))
      #12 /home/gemmemedxe/www/wp-includes/functions.php(1105): WP->main("")
      #13 /home/gemmemedxe/www/wp-blog-header.php(16): wp()
      #14 /home/gemmemedxe/www/index.php(17): require("/home/gemmemedxe/www/wp-blog-header.php")
      #15 {main}
  
  ```
  
  **Tags:** contribution-page, registration, roles
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2019-09-23. Score: 1
  
  Ok, thanks a lot username_1 but I could not get what I should do in there and finally found the solution.
  
  So the trick was with the capabilities.
  I installed user role editor and found out that by default, a subscriber is granted way more capabilities than just "read", which are :
  
  ```
  access_all_custom_data
  access_civimail_subscribe_unsubscribe_pages
  access_uploaded_files
  make_online_contributions
  profile_create
  profile_edit
  profile_listings
  profile_view
  read
  register_for_events
  sign_civicrm_petition
  view_event_info
  view_public_civimail_content
  
  ```
  
  So basicaly if your custom roles are not granted those capabilities, users will get denied the access to some civi page at some point.
  
  So in wordpress I just went Users > User role Editor and updated my custom roles with the right capabilities.
  
  Hope it helps !
  
  
  ---
  
  ### Answer by username_1 on 2019-09-22. Score: 0
  
  Go to <https://your-site/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Faccess%2Fwp-permissions&reset=1>
  
  You can also get there from under administer - users and permissions - permissions, and then on that page there's the link to wordpress access control.
  
  
  ---
  
  