Answers.Body: <p>It sounds like you don't have civicontribute enabled.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-06-13T13:52:30.397Z
Answers.Text: I don't, do we need it? we don't accept contributions.
Answers.UserDisplayName: themak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-06-13T15:25:00.710Z
Answers.Text: Enabled civicontribute and that solved it - strange. Thanks for the tip
Answers.UserDisplayName: themak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-06-12T21:43:55.637Z
Answers.LastActivityDate: 2024-06-12T21:43:55.637Z
Answers.UserDisplayName: Demerit
Body: <p>When registering for an event - I get the following fatal error:
  Registration is successful, email is sent.
  Thank You page is not displayed.</p>
  <p>CiviCRM 5.73.3 WordPress 6.5.4</p>
  <pre><code>Fatal error: Uncaught Error: Class 'Civi\Api4\PCPBlock' not found in /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Event/Form/Registration/ThankYou.php:227 Stack trace: #0 /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Event/Form/Registration/ThankYou.php(193): CRM_Event_Form_Registration_ThankYou-&gt;getPCPBlockID() #1 /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(774): CRM_Event_Form_Registration_ThankYou-&gt;buildQuickForm() #2 /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php(76): CRM_Core_Form-&gt;buildForm() #3 /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display-&gt;perform(Object(CRM_Event_Form_Registration_ThankYou), 'display') #4 /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller-&gt;handle(Object(CRM_Event_Form_Registration_ThankYou), 'display') #5 /home/prinyc/www/www/wp-content in /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Event/Form/Registration/ThankYou.php on line 227
  </code></pre>
  <p><a href="https://i.sstatic.net/LhAXWSBd.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/LhAXWSBd.png" alt="enter image description here" /></a></p>
  
Tags: <wordpress><civievent><apiv4>
Title: CiviCRM Wordpress Critical Error Upon Event Registration
ThreadText: # CiviCRM Wordpress Critical Error Upon Event Registration
  
  (Asked by: username_0 on 2024-06-12)
  
  When registering for an event - I get the following fatal error:
  Registration is successful, email is sent.
  Thank You page is not displayed.
  
  CiviCRM 5.73.3 WordPress 6.5.4
  
  ```
  Fatal error: Uncaught Error: Class 'Civi\Api4\PCPBlock' not found in /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Event/Form/Registration/ThankYou.php:227 Stack trace: #0 /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Event/Form/Registration/ThankYou.php(193): CRM_Event_Form_Registration_ThankYou->getPCPBlockID() #1 /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(774): CRM_Event_Form_Registration_ThankYou->buildQuickForm() #2 /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php(76): CRM_Core_Form->buildForm() #3 /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Event_Form_Registration_ThankYou), 'display') #4 /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Event_Form_Registration_ThankYou), 'display') #5 /home/prinyc/www/www/wp-content in /home/prinyc/www/www/wp-content/plugins/civicrm/civicrm/CRM/Event/Form/Registration/ThankYou.php on line 227
  
  ```
  
  [![enter image description here](https://i.sstatic.net/LhAXWSBd.png)](https://i.sstatic.net/LhAXWSBd.png)
  
  **Tags:** wordpress, civievent, apiv4
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-06-12. Score: 2
  
  It sounds like you don't have civicontribute enabled.
  
  > **Comments:**
  > **username_0**: I don't, do we need it? we don't accept contributions.  
  > **username_0**: Enabled civicontribute and that solved it - strange. Thanks for the tip  
  
  ---
  
  