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 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.

  • are Permalinks correctly configured?
    – Graham
    Sep 29, 2022 at 14:55
  • @steve did you get anywhere with this? We're experiencing the same on WP 6.3.1 and Civi 5.63.4 tried everything!
    – Darren
    Oct 18, 2023 at 15:39

3 Answers 3


Partial success: If I set the Shortcode Display Mode setting 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).

  • 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?
    – Steve
    Mar 26, 2022 at 12:57
  • Just to note that using the CiviEvent Widget to display a list of events on a post also leads to the same error when trying to register.
    – Steve
    Mar 26, 2022 at 13:05
  • 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.
    – Darren
    Oct 18, 2023 at 15:56

Can you also see if you have Cleaner URLs enabled?

This post CiviEvent - Error when registering: Could not find valid value for id 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.

  • Thank you, but yes, I checked civicrm.settings.php and the actual URLs, and they're clean. (And it's a new installation.)
    – Steve
    Mar 27, 2022 at 8:49

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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