Answers.Body: <p>just discovered that 'Clean URLS' weren't activated ie the code checking for it wasn't in my config as described here:
  <a href="https://docs.civicrm.org/sysadmin/en/latest/integration/wordpress/clean-urls/" rel="nofollow noreferrer">https://docs.civicrm.org/sysadmin/en/latest/integration/wordpress/clean-urls/</a></p>
  <p>so i had to add it manually and everything works fine now.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T09:03:26.723Z
Answers.LastActivityDate: 2022-01-03T09:03:26.723Z
Answers.UserDisplayName: markusk
Body: <p><strong>setup:</strong><br />
  CiviCRM 5.44.0 with Wordpress 5.8.2 / PHP 7.4.27 (tested 8.0.14 as well fwiw)</p>
  <p><strong>problem:</strong><br />
  since the latest upgrade the &quot;thank you&quot; page after event registration gives the error</p>
  <pre><code>Could not find valid value for id
  </code></pre>
  <p>registration is finished (confirmation mail is sent).
  there is no payment processor installed or used, all registrations need to choose &quot;pay later&quot;.</p>
  <p><strong>Log:</strong></p>
  <pre><code>Jan 03 00:23:34  [error]
  $Fatal Error Details = array:3 [
    &quot;message&quot; =&gt; &quot;Konnte keinen gültigen Wert für id finden.&quot;
    &quot;code&quot; =&gt; null
    &quot;exception&quot; =&gt; CRM_Core_Exception {#5193
      -errorData: array:1 [
        &quot;error_code&quot; =&gt; 0
      ]
      #cause: null
      -_trace: null
      #message: &quot;Konnte keinen gültigen Wert für id finden.&quot;
      #code: 0
      #file: &quot;/var/www/vhosts/mydomain.net/admin.mydomain.net/wp-content/plugins/civicrm/civicrm/CRM/Utils/Request.php&quot;
      #line: 98
      trace: {
        /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-content/plugins/civicrm/civicrm/CRM/Utils/Request.php:98 {
          › if (!isset($value) &amp;&amp; $abort) {
          ›   throw new CRM_Core_Exception(ts('Could not find valid value for %1', [1 =&gt; $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(&quot;backTrace&quot;, 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-&gt;invoke()
  #4 /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-includes/class-wp-hook.php(303): CiviCRM_For_WordPress_Basepage-&gt;basepage_handler(Object(WP))
  #5 /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-includes/class-wp-hook.php(327): WP_Hook-&gt;apply_filters(&quot;&quot;, (Array:1))
  #6 /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-includes/plugin.php(518): WP_Hook-&gt;do_action((Array:1))
  #7 /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-includes/class-wp.php(763): do_action_ref_array(&quot;wp&quot;, (Array:1))
  #8 /var/www/vhosts/mydomain.net/admin.mydomain.net/wp-includes/functions.php(1291): WP-&gt;main(&quot;&quot;)
  #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(&quot;/var/www/vhosts/mydomain.net/admin.mydomain.net/wp-blog-header.php&quot;)
  #11 {main}
  </code></pre>
  <p><strong>what i tried:</strong><br />
  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</p>
  <pre><code>/civicrm/?civiwp=CiviCRM&amp;q=civicrm%2Fevent%2Fregister&amp;_qf_Confirm_display=true&amp;qfKey=CRMEventControllerRegistrationXXXXX
  
  /civicrm/?civiwp=CiviCRM&amp;q=civicrm%2Fevent%2Fregister&amp;_qf_ThankYou_display=true&amp;qfKey=CRMEventControllerRegistrationXXXXX
  </code></pre>
  <p>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.</p>
  <p>also the base page is set correctly.</p>
  <p>trying to get this solved for a couple of weeks now but am a bit lost.<br />
  thankful for any hints.</p>
  <hr />
  <hr />
  <p>ruled out by @Demerit in comments:</p>
  <p><strong>what baffles me:</strong><br />
  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:</p>
  <pre><code>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&amp;q=civicrm%2Fevent%2Fregister&amp;_qf_Confirm_display=true&amp;qfKey=CRMEventControllerRegistrationXXXXX
  </code></pre>
  <p>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</p>
  <pre><code>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&amp;q=civicrm%2Fevent%2Fregister&amp;_qf_Confirm_display=true&amp;qfKey=CRMEventControllerRegistrationXXXXX
  </code></pre>
  <p>and somehow have doubts if this actually would help anything.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-02T21:27:48.860Z
Comments.Text: The openbasedir is just a warning. It's worked around in 5.45 via https://github.com/civicrm/civicrm-core/pull/21589. I think the problem here would be something else.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-02T23:12:55.420Z
Comments.Text: thanks for confirming my suspicion @Demerit .. one path less to follow..
Comments.UserDisplayName: markusk
Tags: <wordpress><civievent>
Title: Why is event registration "thank you" giving an error?
ThreadText: # Why is event registration "thank you" giving an error?
  
  (Asked by: username_0 on 2022-01-02)
  
  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 @username_1 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.
  
  **Tags:** wordpress, civievent
  
  > **Comments:**
  > **username_1**: The openbasedir is just a warning. It's worked around in 5.45 via https://github.com/civicrm/civicrm-core/pull/21589. I think the problem here would be something else.  
  > **username_0**: thanks for confirming my suspicion @username_1 .. one path less to follow..  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2022-01-03. Score: 4 | Accepted answer
  
  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.
  
  
  ---
  
  