Answers.Body: <p>Yes I found :-)
  the civicrm.settings.php must have this bit of code:</p>
  <pre><code>   if ( function_exists('variable_get') &amp;&amp; variable_get('clean_url', '0') != '0') {
       define('CIVICRM_CLEANURL', 1 );
     }
     elseif ( function_exists('config_get') &amp;&amp; config_get('system.core', 'clean_url') != 0) {
       define('CIVICRM_CLEANURL', 1 );
     }
     elseif( function_exists('get_option') &amp;&amp; get_option('permalink_structure') != '' ) {
       define('CIVICRM_CLEANURL', 1 );
     }
     else {
       define('CIVICRM_CLEANURL', 0);
     }
   }```
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-11-02T22:54:36.280Z
Answers.LastActivityDate: 2022-11-02T22:54:36.280Z
Answers.UserDisplayName: Phil
Body: <p>We have a trouble with CiviEvent with <strong>CiviCRM 5.54.1, Wordpress 6.1</strong></p>
  <p>We can do the register, send mail but when the ThankYou page is display a message error is display : <strong>&quot;Could not find valid value for id
  Return to home page.&quot;</strong></p>
  <p><strong>URL of thank you page</strong>: <a href="http://domain.org/fr/civicrm/?civiwp=CiviCRM&amp;q=civicrm%2Fevent%2Fregister&amp;_qf_ThankYou_display=true&amp;qfKey=CRMEventControllerRegistration30.." rel="nofollow noreferrer">http://domain.org/fr/civicrm/?civiwp=CiviCRM&amp;q=civicrm%2Fevent%2Fregister&amp;_qf_ThankYou_display=true&amp;qfKey=CRMEventControllerRegistration30..</a>.</p>
  <p><strong>From the error log :</strong></p>
  <pre><code>nov. 02 19:31:37  [error] 
  $Fatal Error Details = array:3 [
    &quot;message&quot; =&gt; &quot;Aucune donnée valide n'a pu être trouvée pour la variable « id ».&quot;
    &quot;code&quot; =&gt; null
    &quot;exception&quot; =&gt; CRM_Core_Exception {#12638
      -errorData: array:1 [
        &quot;error_code&quot; =&gt; 0
      ]
      #cause: null
      -_trace: null
      #message: &quot;Aucune donnée valide n'a pu être trouvée pour la variable « id ».&quot;
      #code: 0
      #file: &quot;/home/domaine/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/Request.php&quot;
      #line: 98
      trace: {
        /home/domaine/www/www/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]));
          › }
        }
        /home/domaine/www/www/wp-content/plugins/civicrm/civicrm/CRM/Event/StateMachine/Registration.php:27 { …}
        /home/domaine/www/www/wp-content/plugins/civicrm/civicrm/CRM/Event/Controller/Registration.php:27 { …}
        /home/domaine/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:314 { …}
        /home/domaine/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 { …}
        /home/domaine/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { …}
        /home/domaine/www/www/wp-content/plugins/civicrm/civicrm.php:1199 { …}
        /home/domaine/www/www/wp-content/plugins/civicrm/includes/civicrm.basepage.php:380 { …}
        /home/domaine/www/www/wp-includes/class-wp-hook.php:308 { …}
        /home/domaine/www/www/wp-includes/class-wp-hook.php:332 { …}
        /home/domaine/www/www/wp-includes/plugin.php:565 { …}
        /home/domaine/www/www/wp-includes/class-wp.php:797 { …}
        /home/domaine/www/www/wp-includes/functions.php:1332 { …}
        /home/domaine/www/www/wp-blog-header.php:16 { …}
        /home/domaine/www/www/index.php:17 { …}
      }
    }
  ]
  
  
  nov. 02 19:31:37  [debug] $backTrace = #0 /home/domaine/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(441): CRM_Core_Error::backtrace(&quot;backTrace&quot;, TRUE)
  #1 /home/domaine/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(39): CRM_Core_Error::handleUnhandledException(Object(CRM_Core_Exception))
  #2 /home/domaine/www/www/wp-content/plugins/civicrm/civicrm.php(1199): CRM_Core_Invoke::invoke((Array:3))
  #3 /home/domaine/www/www/wp-content/plugins/civicrm/includes/civicrm.basepage.php(380): CiviCRM_For_WordPress-&gt;invoke()
  #4 /home/domaine/www/www/wp-includes/class-wp-hook.php(308): CiviCRM_For_WordPress_Basepage-&gt;basepage_handler(Object(WP))
  #5 /home/domaine/www/www/wp-includes/class-wp-hook.php(332): WP_Hook-&gt;apply_filters(NULL, (Array:1))
  #6 /home/domaine/www/www/wp-includes/plugin.php(565): WP_Hook-&gt;do_action((Array:1))
  #7 /home/domaine/www/www/wp-includes/class-wp.php(797): do_action_ref_array(&quot;wp&quot;, (Array:1))
  #8 /home/domaine/www/www/wp-includes/functions.php(1332): WP-&gt;main(&quot;&quot;)
  #9 /home/domaine/www/www/wp-blog-header.php(16): wp()
  #10 /home/domaine/www/www/index.php(17): require(&quot;/home/domaine/www/www/wp-blog-header.php&quot;)
  #11 {main}
  </code></pre>
  <p><strong>Already done :</strong>
  I already check that a WP page with the 'civicrm' permalink is present and a 'base page' within CiviCRM is configurated in Administer-&gt;System setting-&gt;CMS Database Integration</p>
  <p>Do you have an idea of the root cause ?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-11-02T22:05:02.350Z
Comments.Text: I'd look at https://civicrm.stackexchange.com/questions/41578/could-not-find-valid-value-for-id-after-event-registration-on-wordpress-5-9-1/ The two answers should help get you sorted
Comments.UserDisplayName: Kevin Cristiano
Tags: <wordpress><civievent><error><online-registration>
Title: CiviEvent : Error on event registration Thank-you page
ThreadText: # CiviEvent : Error on event registration Thank-you page
  
  (Asked by: username_0 on 2022-11-02)
  
  We have a trouble with CiviEvent with **CiviCRM 5.54.1, Wordpress 6.1**
  
  We can do the register, send mail but when the ThankYou page is display a message error is display : **"Could not find valid value for id
  Return to home page."**
  
  **URL of thank you page**: <http://domain.org/fr/civicrm/?civiwp=CiviCRM&q=civicrm%2Fevent%2Fregister&_qf_ThankYou_display=true&qfKey=CRMEventControllerRegistration30..>.
  
  **From the error log :**
  
  ```
  nov. 02 19:31:37  [error] 
  $Fatal Error Details = array:3 [
    "message" => "Aucune donnée valide n'a pu être trouvée pour la variable « id »."
    "code" => null
    "exception" => CRM_Core_Exception {#12638
      -errorData: array:1 [
        "error_code" => 0
      ]
      #cause: null
      -_trace: null
      #message: "Aucune donnée valide n'a pu être trouvée pour la variable « id »."
      #code: 0
      #file: "/home/domaine/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/Request.php"
      #line: 98
      trace: {
        /home/domaine/www/www/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]));
          › }
        }
        /home/domaine/www/www/wp-content/plugins/civicrm/civicrm/CRM/Event/StateMachine/Registration.php:27 { …}
        /home/domaine/www/www/wp-content/plugins/civicrm/civicrm/CRM/Event/Controller/Registration.php:27 { …}
        /home/domaine/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:314 { …}
        /home/domaine/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 { …}
        /home/domaine/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { …}
        /home/domaine/www/www/wp-content/plugins/civicrm/civicrm.php:1199 { …}
        /home/domaine/www/www/wp-content/plugins/civicrm/includes/civicrm.basepage.php:380 { …}
        /home/domaine/www/www/wp-includes/class-wp-hook.php:308 { …}
        /home/domaine/www/www/wp-includes/class-wp-hook.php:332 { …}
        /home/domaine/www/www/wp-includes/plugin.php:565 { …}
        /home/domaine/www/www/wp-includes/class-wp.php:797 { …}
        /home/domaine/www/www/wp-includes/functions.php:1332 { …}
        /home/domaine/www/www/wp-blog-header.php:16 { …}
        /home/domaine/www/www/index.php:17 { …}
      }
    }
  ]
  
  nov. 02 19:31:37  [debug] $backTrace = #0 /home/domaine/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(441): CRM_Core_Error::backtrace("backTrace", TRUE)
  #1 /home/domaine/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(39): CRM_Core_Error::handleUnhandledException(Object(CRM_Core_Exception))
  #2 /home/domaine/www/www/wp-content/plugins/civicrm/civicrm.php(1199): CRM_Core_Invoke::invoke((Array:3))
  #3 /home/domaine/www/www/wp-content/plugins/civicrm/includes/civicrm.basepage.php(380): CiviCRM_For_WordPress->invoke()
  #4 /home/domaine/www/www/wp-includes/class-wp-hook.php(308): CiviCRM_For_WordPress_Basepage->basepage_handler(Object(WP))
  #5 /home/domaine/www/www/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, (Array:1))
  #6 /home/domaine/www/www/wp-includes/plugin.php(565): WP_Hook->do_action((Array:1))
  #7 /home/domaine/www/www/wp-includes/class-wp.php(797): do_action_ref_array("wp", (Array:1))
  #8 /home/domaine/www/www/wp-includes/functions.php(1332): WP->main("")
  #9 /home/domaine/www/www/wp-blog-header.php(16): wp()
  #10 /home/domaine/www/www/index.php(17): require("/home/domaine/www/www/wp-blog-header.php")
  #11 {main}
  
  ```
  
  **Already done :**
  I already check that a WP page with the 'civicrm' permalink is present and a 'base page' within CiviCRM is configurated in Administer->System setting->CMS Database Integration
  
  Do you have an idea of the root cause ?
  
  **Tags:** wordpress, civievent, error, online-registration
  
  > **Comments:**
  > **username_1**: I'd look at https://civicrm.stackexchange.com/questions/41578/could-not-find-valid-value-for-id-after-event-registration-on-wordpress-5-9-1/ The two answers should help get you sorted  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2022-11-02. Score: 2
  
  Yes I found :-)
  the civicrm.settings.php must have this bit of code:
  
  ```
     if ( function_exists('variable_get') && variable_get('clean_url', '0') != '0') {
       define('CIVICRM_CLEANURL', 1 );
     }
     elseif ( function_exists('config_get') && config_get('system.core', 'clean_url') != 0) {
       define('CIVICRM_CLEANURL', 1 );
     }
     elseif( function_exists('get_option') && get_option('permalink_structure') != '' ) {
       define('CIVICRM_CLEANURL', 1 );
     }
     else {
       define('CIVICRM_CLEANURL', 0);
     }
   }```
  
  ```
  
  
  ---
  
  