Using CiviCRM 5.7.2, using Drupal 7.61.

I thought I had fixed this error but it looks like my fix has created another problem... or at least another error has decided to appear.

This is an intermittent error, have not been able to replicate yet but had it reported by a member of our staff.

Upon registering for an event with event registration turned on, and confirmation screen / emails turned on, and payment turned off, the user receives this error message.

Could not find valid value for id

This error seems different to other similar reported errors in that the registration does not go through. The user does not see the confirmation screen, they do not receive the confirmation email, and their registration does not feed into CiviCRM.

Went into the drupal error logs and saw the following errors:

$Fatal Error Details = Array ( [message] => Could not find valid value for id [code] => )


$backTrace = #0 /home2/ppe/public_html/sites/all/modules/civicrm/CRM/Core/Error.php(381): CRM_Core_Error::backtrace("backTrace", TRUE) #1 /home2/ppe/public_html/sites/all/modules/civicrm/CRM/Utils/Request.php(121): CRM_Core_Error::fatal("Could not find valid value for id") #2 /home2/ppe/public_html/sites/all/modules/civicrm/CRM/Event/StateMachine/Registration.php(52): CRM_Utils_Request::retrieve("id", "Positive", Object(CRM_Event_Controller_Registration), TRUE) #3 /home2/ppe/public_html/sites/all/modules/civicrm/CRM/Event/Controller/Registration.php(47): CRM_Event_StateMachine_Registration->__construct(Object(CRM_Event_Controller_Registration), TRUE) #4 /home2/ppe/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(304): CRM_Event_Controller_Registration->__construct("Event Registration", TRUE, "null", NULL, "false") #5 /home2/ppe/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:15)) #6 /home2/ppe/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3)) #7 /home2/ppe/public_html/sites/all/modules/civicrm/drupal/civicrm.module(445): CRM_Core_Invoke::invoke((Array:3)) #8 /home2/ppe/public_html/includes/menu.inc(527): civicrm_invoke("event", "register") #9 /home2/ppe/public_html/index.php(21): menu_execute_active_handler() #10 {main}

(sorry, not sure how to put that code as a block rather than a massive horizontal scrolling box)

Another user has also reported receiving a 500 error, I'm not sure if it's related. This is what Drupal error log says about their 500 error:

Warning: in_array() expects parameter 2 to be array, null given in CRM_Contact_BAO_Contact::formatProfileContactParams() (line 2128 of /home2/ppe/public_html/sites/all/modules/civicrm/CRM/Contact/BAO/Contact.php).

Anyone encountered anything similar? For now I've just disabled confirmation emails altogether until I work this out.


  • Are you sure that you're using the right link to the event? I used to get that error because I had copied the link from the wrong place - I was using a link specific to me and therefore it didn't work for anyone else. But if I grab the link from the event config page (there's a menu item on the page to get the links), it would work fine. Feb 4, 2019 at 3:51
  • @JenniSimonis thanks for your comment! Yup I am sure this is the correct link. The users were able to input their details on the registration page and pressed the "Continue/Confirm" button and then received these errors.
    – josh
    Feb 4, 2019 at 4:28
  • Yes, when I was using the wrong link, I still got the page and I could put in information. But once I hit the button to go to the next page, I would get the error. Same as what it appears you're reporting. Feb 4, 2019 at 4:35
  • @JenniSimonis Yep it is correct link, I sent the same link to all staff and only one reported this problem :(
    – josh
    Feb 4, 2019 at 4:56
  • Exact same intermittent problem here to (C5.7.3, d7.61). I can see from the referrer field in our web log that the user clicked on the correct register link and the proper id=13 was present, yet CiviLog: /CRM/Utils/Request.php(121): CRM_Core_Error::fatal("Could not find valid value for id").
    – Jamie
    Feb 5, 2019 at 20:29

3 Answers 3


After doing a lot of trial and error and closely analyzing the complaints we have received, I'm fairly sure that the cause of the problem is: you register one person, then click back on your browser and try to register a second. Your browser doesn't properly refresh the page and somehow the id of the event is lost in the process.

I'm not sure what the best fix is - but I'm fairly certain that is the cause.

  • Unfortunately it looks like your problem has a different cause than mine - when we have tested and encountered this error, it's been after opening the direct event link in a new tab and registering - it hasn't let the first person register in the first place. Hope you're able to fix the issue you're facing though!
    – josh
    Feb 24, 2019 at 22:23

This extension may help as it lets you set the 'redirect' page after a form is submitted. therefore it may help if you find folk are using the back page, ie set it so that after a submission the form redirects back to the original form (which would then have the id in)

a risk though might be that folk might worry their submission wasn't successful. not sure. long time since i used it.


@josh, before doing anything else, please upgrade your Drupal site: https://www.drupal.org/SA-CORE-2019-002

Your sysadmin may have applied the patch without running the upgrade.

  • Thanks John - didn't update my post but after posting I updated to 7.64. Haven't tested to see whether this is still a problem 7.64 though
    – josh
    Feb 24, 2019 at 22:21

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.