1

setup:
CiviCRM 5.44.0 with Wordpress 5.8.2 / PHP 7.4.27 (tested 8.0.14 as well fwiw)

problem:
since the latest upgrade the "thank you" page after event registration gives the error

Could not find valid value for id

registration is finished (confirmation mail is sent). there is no payment processor installed or used, all registrations need to choose "pay later".

Log:

Jan 03 00:23:34  [error]
$Fatal Error Details = array:3 [
  "message" => "Konnte keinen gültigen Wert für id finden."
  "code" => null
  "exception" => CRM_Core_Exception {#5193
    -errorData: array:1 [
      "error_code" => 0
    ]
    #cause: null
    -_trace: null
    #message: "Konnte keinen gültigen Wert für id finden."
    #code: 0
    #file: "/var/www/vhosts/mydomain.net/admin.mydomain.net/wp-content/plugins/civicrm/civicrm/CRM/Utils/Request.php"
    #line: 98
    trace: {
      /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-content/plugins/civicrm/civicrm/CRM/Utils/Request.php:98 {
        › if (!isset($value) && $abort) {
        ›   throw new CRM_Core_Exception(ts('Could not find valid value for %1', [1 => $name]));
        › }
      }
      /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-content/plugins/civicrm/civicrm/CRM/Event/StateMachine/Registration.php:27 { …}
      /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-content/plugins/civicrm/civicrm/CRM/Event/Controller/Registration.php:27 { …}
      /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:308 { …}
      /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 { …}
      /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { …}
      /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-content/plugins/civicrm/civicrm.php:1169 { …}
      /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-content/plugins/civicrm/includes/civicrm.basepage.php:366 { …}
      /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-includes/class-wp-hook.php:303 { …}
      /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-includes/class-wp-hook.php:327 { …}
      /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-includes/plugin.php:518 { …}
      /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-includes/class-wp.php:763 { …}
      /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-includes/functions.php:1291 { …}
      /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-blog-header.php:16 { …}
      /var/www/vhosts/mydomain.net/admin.mydomain.net/index.php:17 { …}
    }
  }
]


Jan 03 00:23:34  [debug] $backTrace = #0 /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(433): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(39): CRM_Core_Error::handleUnhandledException(Object(CRM_Core_Exception))
#2 /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-content/plugins/civicrm/civicrm.php(1169): CRM_Core_Invoke::invoke((Array:3))
#3 /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-content/plugins/civicrm/includes/civicrm.basepage.php(366): CiviCRM_For_WordPress->invoke()
#4 /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-includes/class-wp-hook.php(303): CiviCRM_For_WordPress_Basepage->basepage_handler(Object(WP))
#5 /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters("", (Array:1))
#6 /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-includes/plugin.php(518): WP_Hook->do_action((Array:1))
#7 /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-includes/class-wp.php(763): do_action_ref_array("wp", (Array:1))
#8 /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-includes/functions.php(1291): WP->main("")
#9 /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-blog-header.php(16): wp()
#10 /var/www/vhosts/mydomain.net/admin.mydomain.net/index.php(17): require("/var/www/vhosts/mydomain.net/admin.mydomain.net/wp-blog-header.php")
#11 {main}

what i tried:
having found several Questions with similar issues yet and having tested solutions from there i think i can rule out any url-related/rewrite issues - URLs for Confirm and ThankYou are complete and the ID identical

/civicrm/?civiwp=CiviCRM&q=civicrm%2Fevent%2Fregister&_qf_Confirm_display=true&qfKey=CRMEventControllerRegistrationXXXXX

/civicrm/?civiwp=CiviCRM&q=civicrm%2Fevent%2Fregister&_qf_ThankYou_display=true&qfKey=CRMEventControllerRegistrationXXXXX

i think i can also rule out caching issues. i turned off cloudflare caching and switched back to apache (instead of nginx with caching. no caching plugins in wordpress installed.

also the base page is set correctly.

trying to get this solved for a couple of weeks now but am a bit lost.
thankful for any hints.



ruled out by @Demerit in comments:

what baffles me:
in the server's log i'm having a lot of errors related to 'open_basedir restriction in effect' mocking about /CRM/Core/Smarty/plugins/ not being within the allowed paths. right after the error displayed when finishing a registration it's:

Got error 'PHP message: PHP Warning: file_exists(): open_basedir restriction in effect. File(/CRM/Core/Smarty/plugins/) is not within the allowed path(s): (/var/www/vhosts/mydomain.net/:/tmp/) in /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-content/plugins/civicrm/civicrm/CRM/Core/Smarty.php on line 108', referer: https://admin.mydomain.net/civicrm/?civiwp=CiviCRM&q=civicrm%2Fevent%2Fregister&_qf_Confirm_display=true&qfKey=CRMEventControllerRegistrationXXXXX

i already tried the obvious - adding the path to the allowed ones - but i'm not sure i did it right as i'm getting this afterwards

Got error 'PHP message: PHP Warning: file_exists(): open_basedir restriction in effect. File(/CRM/Core/Smarty/plugins/) is not within the allowed path(s): (/var/www/vhosts/mydomain.net/:/tmp/:/var/www/vhosts/mydomain.net/admin.mydomain.net/wp-content/plugins/civicrm/civicrm/CRM/Core/Smarty/plugins/) in /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-content/plugins/civicrm/civicrm/CRM/Core/Smarty.php on line 108', referer: https://admin.mydomain.net/civicrm/?civiwp=CiviCRM&q=civicrm%2Fevent%2Fregister&_qf_Confirm_display=true&qfKey=CRMEventControllerRegistrationXXXXX

and somehow have doubts if this actually would help anything.

2
  • The openbasedir is just a warning. It's worked around in 5.45 via github.com/civicrm/civicrm-core/pull/21589. I think the problem here would be something else.
    – Demerit
    Jan 2 at 21:27
  • thanks for confirming my suspicion @Demerit .. one path less to follow..
    – markusk
    Jan 2 at 23:12

1 Answer 1

4

just discovered that 'Clean URLS' weren't activated ie the code checking for it wasn't in my config as described here: https://docs.civicrm.org/sysadmin/en/latest/integration/wordpress/clean-urls/

so i had to add it manually and everything works fine now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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