Answers.Body: <p>Can you also see if you have Cleaner URLs enabled?</p>
  <p>This post <a href="https://civicrm.stackexchange.com/questions/4793/civievent-error-when-registering-could-not-find-valid-value-for-id/40996#40996">CiviEvent - Error when registering: Could not find valid value for id</a>  details the settings and what issues that has fixed.</p>
  <p>Cleaner URLs are the default now, but if your site has been upgraded from an older version they may not be enabled.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-27T08:49:29.463Z
Answers.Text: Thank you, but yes, I checked `civicrm.settings.php` and the actual URLs, and they're clean. (And it's a new installation.)
Answers.UserDisplayName: Steve
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-26T14:56:50.280Z
Answers.LastActivityDate: 2022-03-26T14:56:50.280Z
Answers.UserDisplayName: Kevin Cristiano
Answers.Body: <p>Partial success: If I set <a href="https://docs.civicrm.org/sysadmin/en/latest/integration/wordpress/#shortcode-settings" rel="nofollow noreferrer">the <code>Shortcode Display Mode</code> setting</a> to <code>Remain in Shortcode Mode</code>, then registration completes successfully without the error <em>if I access the event via a short code</em>.</p>
  <p>However, I still get the error if I register to an event that I access via the list in <code>https://mydomain.tld/civicrm/event/list/</code> (and then selecting one event in the list and clicking Register).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-26T12:57:09.863Z
Answers.Text: Maybe that's not the best way to show all events? What is? Do people, then, manually create new pages in Wordpress for each new event in CiviCRM? Isn't that duplicating a lot of work?
Answers.UserDisplayName: Steve
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-26T13:05:40.093Z
Answers.Text: Just to note that using [the CiviEvent Widget](https://wordpress.org/plugins/civievent-widget/) to display a list of events on a post also leads to the same error when trying to register.
Answers.UserDisplayName: Steve
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-10-18T15:56:29.753Z
Answers.Text: Same here, we're getting the same error unless the event is manually embedded in a Page using shortcode, and remain in shortcode mode is set.
Answers.UserDisplayName: Darren
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-26T12:54:47.943Z
Answers.LastActivityDate: 2022-03-26T12:54:47.943Z
Answers.UserDisplayName: Steve
Answers.Body: <p>Are you using YOOtheme Pro? And its extension Essentials for YOOtheme by ZOOlanders?<br/>
  Try deactivating the plugin: <a href="https://lab.civicrm.org/dev/core/-/issues/4394#note_92175" rel="nofollow noreferrer">https://lab.civicrm.org/dev/core/-/issues/4394#note_92175</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-06-27T15:02:50.617Z
Answers.LastActivityDate: 2023-06-27T15:02:50.617Z
Answers.UserDisplayName: Guitarman
Body: <p>When participants confirm the registration to an event (paid, in this case, but the error is the same for free ones), an error appears (the one in the title). The bug stack in the logs:</p>
  <pre><code>CRM_Core_Exception: Could not find valid value for id in /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Event/StateMachine/Registration.php on line 27
  
  0   CRM_Utils_Request::retrieve('id', 'Positive', Object(CRM_Event_Controller_Registration), true)  /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Event/StateMachine/Registration.php:27
  1   CRM_Event_StateMachine_Registration-&gt;__construct(Object(CRM_Event_Controller_Registration), true)   /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Event/Controller/Registration.php:27
  2   CRM_Event_Controller_Registration-&gt;__construct('Event Registrati…', true, 'null', null, 'false')    /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:314
  3   CRM_Core_Invoke::runItem(Array) /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69
  4   CRM_Core_Invoke::_invoke(Array) /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36
  5   CRM_Core_Invoke::invoke(Array)  /var/www/wordpress/wp-content/plugins/civicrm/civicrm.php:1199
  6   CiviCRM_For_WordPress-&gt;invoke() /var/www/wordpress/wp-content/plugins/civicrm/includes/civicrm.basepage.php:380
  7   CiviCRM_For_WordPress_Basepage-&gt;basepage_handler(Object(WP))    /var/www/wordpress/wp-includes/class-wp-hook.php:307
  8   WP_Hook-&gt;apply_filters(null, Array) /var/www/wordpress/wp-includes/class-wp-hook.php:331
  9   WP_Hook-&gt;do_action(Array)   /var/www/wordpress/wp-includes/plugin.php:522
  10  do_action_ref_array('wp', Array)    /var/www/wordpress/wp-includes/class-wp.php:771
  11  WP-&gt;main('')    /var/www/wordpress/wp-includes/functions.php:1310
  12  wp()    /var/www/wordpress/wp-blog-header.php:16
  13  require('/var/www/wordpre…')    /var/www/wordpress/index.php:17
  14  {main}
  </code></pre>
  <p>And the error that the users see is <code>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.</code>
  <code>Could not find valid value for id</code></p>
  <p>Note that I've looked at other questions and answers related to this, and, among others, I made sure that CiviCRM uses a valid Wordpress page in <code>Administer -&gt; System Settings -&gt; CMS Database Integration</code> (called 'civicrm'), that caching is disabled, and that clean URLS are activated, as they suggested.</p>
  <p>The way I get to the event page is by first navigating to the list in <code>https://mydomain.tld/civicrm/event/list/</code>, and then selecting one event in the list.</p>
  <p>I tried to also create a new blog post, insert the short code <code>[civicrm component=&quot;event&quot; id=&quot;8&quot; action=&quot;info&quot; mode=&quot;live&quot; hijack=&quot;0&quot;]</code>, and click on <code>Register</code>, but I get the very same error...</p>
  <p><a href="https://civicrm.stackexchange.com/questions/11943/error-when-registering-civievent-could-not-find-valid-value-for-id#comment22411_11951">There's one comment</a> that may be relevant, but I didn't understand how to act on; who knows, maybe it's relevant, but I don't know what it means to &quot;re-enter the links to Events in the shortcode for the WP calendar&quot;.</p>
  <p>Thanks in advance.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-09-29T14:55:04.803Z
Comments.Text: are Permalinks correctly configured?
Comments.UserDisplayName: Graham
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-10-18T15:39:11.730Z
Comments.Text: @steve did you get anywhere with this? We're experiencing the same on WP 6.3.1 and Civi 5.63.4 tried everything!
Comments.UserDisplayName: Darren
Tags: <wordpress><civievent>
Title: "Could not find valid value for id" after event registration on WordPress 5.9.1 and CiviCRM 5.47.2
ThreadText: # "Could not find valid value for id" after event registration on WordPress 5.9.1 and CiviCRM 5.47.2
  
  (Asked by: username_0 on 2022-03-26)
  
  When participants confirm the registration to an event (paid, in this case, but the error is the same for free ones), an error appears (the one in the title). The bug stack in the logs:
  
  ```
  CRM_Core_Exception: Could not find valid value for id in /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Event/StateMachine/Registration.php on line 27
  
  0   CRM_Utils_Request::retrieve('id', 'Positive', Object(CRM_Event_Controller_Registration), true)  /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Event/StateMachine/Registration.php:27
  1   CRM_Event_StateMachine_Registration->__construct(Object(CRM_Event_Controller_Registration), true)   /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Event/Controller/Registration.php:27
  2   CRM_Event_Controller_Registration->__construct('Event Registrati…', true, 'null', null, 'false')    /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:314
  3   CRM_Core_Invoke::runItem(Array) /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69
  4   CRM_Core_Invoke::_invoke(Array) /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36
  5   CRM_Core_Invoke::invoke(Array)  /var/www/wordpress/wp-content/plugins/civicrm/civicrm.php:1199
  6   CiviCRM_For_WordPress->invoke() /var/www/wordpress/wp-content/plugins/civicrm/includes/civicrm.basepage.php:380
  7   CiviCRM_For_WordPress_Basepage->basepage_handler(Object(WP))    /var/www/wordpress/wp-includes/class-wp-hook.php:307
  8   WP_Hook->apply_filters(null, Array) /var/www/wordpress/wp-includes/class-wp-hook.php:331
  9   WP_Hook->do_action(Array)   /var/www/wordpress/wp-includes/plugin.php:522
  10  do_action_ref_array('wp', Array)    /var/www/wordpress/wp-includes/class-wp.php:771
  11  WP->main('')    /var/www/wordpress/wp-includes/functions.php:1310
  12  wp()    /var/www/wordpress/wp-blog-header.php:16
  13  require('/var/www/wordpre…')    /var/www/wordpress/index.php:17
  14  {main}
  
  ```
  
  And the error that the users see is `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.`
  `Could not find valid value for id`
  
  Note that I've looked at other questions and answers related to this, and, among others, I made sure that CiviCRM uses a valid Wordpress page in `Administer -> System Settings -> CMS Database Integration` (called 'civicrm'), that caching is disabled, and that clean URLS are activated, as they suggested.
  
  The way I get to the event page is by first navigating to the list in `https://mydomain.tld/civicrm/event/list/`, and then selecting one event in the list.
  
  I tried to also create a new blog post, insert the short code `[civicrm component="event" id="8" action="info" mode="live" hijack="0"]`, and click on `Register`, but I get the very same error...
  
  [There's one comment](https://civicrm.stackexchange.com/questions/11943/error-when-registering-civievent-could-not-find-valid-value-for-id#comment22411_11951) that may be relevant, but I didn't understand how to act on; who knows, maybe it's relevant, but I don't know what it means to "re-enter the links to Events in the shortcode for the WP calendar".
  
  Thanks in advance.
  
  **Tags:** wordpress, civievent
  
  > **Comments:**
  > **username_1**: are Permalinks correctly configured?  
  > **username_2**: @username_0 did you get anywhere with this? We're experiencing the same on WP 6.3.1 and Civi 5.63.4 tried everything!  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_3 on 2022-03-26. Score: 1
  
  Can you also see if you have Cleaner URLs enabled?
  
  This post [CiviEvent - Error when registering: Could not find valid value for id](https://civicrm.stackexchange.com/questions/4793/civievent-error-when-registering-could-not-find-valid-value-for-id/40996#40996) details the settings and what issues that has fixed.
  
  Cleaner URLs are the default now, but if your site has been upgraded from an older version they may not be enabled.
  
  > **Comments:**
  > **username_0**: Thank you, but yes, I checked `civicrm.settings.php` and the actual URLs, and they're clean. (And it's a new installation.)  
  
  ---
  
  ### Answer by username_0 on 2022-03-26. Score: 1
  
  Partial success: If I set [the `Shortcode Display Mode` setting](https://docs.civicrm.org/sysadmin/en/latest/integration/wordpress/#shortcode-settings) to `Remain in Shortcode Mode`, then registration completes successfully without the error *if I access the event via a short code*.
  
  However, I still get the error if I register to an event that I access via the list in `https://mydomain.tld/civicrm/event/list/` (and then selecting one event in the list and clicking Register).
  
  > **Comments:**
  > **username_0**: Maybe that's not the best way to show all events? What is? Do people, then, manually create new pages in Wordpress for each new event in CiviCRM? Isn't that duplicating a lot of work?  
  > **username_0**: Just to note that using [the CiviEvent Widget](https://wordpress.org/plugins/civievent-widget/) to display a list of events on a post also leads to the same error when trying to register.  
  > **username_2**: Same here, we're getting the same error unless the event is manually embedded in a Page using shortcode, and remain in shortcode mode is set.  
  
  ---
  
  ### Answer by username_4 on 2023-06-27. Score: 0
  
  Are you using YOOtheme Pro? And its extension Essentials for YOOtheme by ZOOlanders?  
  Try deactivating the plugin: <https://lab.civicrm.org/dev/core/-/issues/4394#note_92175>
  
  
  ---
  
  