Answers.Body: <p>Can you check your civicrm.settings.php have exact below code for clean url?</p>
  <pre><code>if (!defined('CIVICRM_CLEANURL')) {
    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-10-19T13:05:30.850Z
Answers.LastActivityDate: 2022-10-19T13:05:30.850Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>I have a simple and largely up to date Wordpress 6.02/Civi 5.53 site running registrations for a single paid event. I'm taking payments using the Stripe extension. It couldn't get much more straightforward.</p>
  <p>However I'm seeing an error &quot;Could not find valid value for id&quot; that is stopping some people from registering.</p>
  <p>I've checked through other posts here on this issue, including:</p>
  <p><a href="https://civicrm.stackexchange.com/questions/4793/civievent-error-when-registering-could-not-find-valid-value-for-id/40996#40996">CiviEvent - Error when registering: Could not find valid value for id</a></p>
  <p>and</p>
  <p><a href="https://civicrm.stackexchange.com/questions/41578/could-not-find-valid-value-for-id-after-event-registration-on-wordpress-5-9-1">&quot;Could not find valid value for id&quot; after event registration on WordPress 5.9.1 and CiviCRM 5.47.2</a></p>
  <p>and I can't see anything wrong with my set-up. Clean URLs, base page, permalinks are all good. I'm not using a shortcode for the event registration form.</p>
  <p>It looks like the majority of registrations are working fine, but I've had a few people get in touch reporting the error.</p>
  <p>Here's what gets logged:</p>
  <pre><code>$Fatal Error Details = array:3 [
    &quot;message&quot; =&gt; &quot;Could not find valid value for id&quot;
    &quot;code&quot; =&gt; null
    &quot;exception&quot; =&gt; CRM_Core_Exception {#6388
      -errorData: array:1 [
        &quot;error_code&quot; =&gt; 0
      ]
      #cause: null
      -_trace: null
      #message: &quot;Could not find valid value for id&quot;
      #code: 0
      #file: &quot;/home/wf/sites/default/wp-content/plugins/civicrm/civicrm/CRM/Utils/Request.php&quot;
      #line: 98
      trace: {
        /home/wf/sites/default/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/wf/sites/default/wp-content/plugins/civicrm/civicrm/CRM/Event/StateMachine/Registration.php:27 { ?~@?}
        /home/wf/sites/default/wp-content/plugins/civicrm/civicrm/CRM/Event/Controller/Registration.php:27 { ?~@?}
        /home/wf/sites/default/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:314 { ?~@?}
        /home/wf/sites/default/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 { ?~@?}
        /home/wf/sites/default/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { ?~@?}
        /home/wf/sites/default/wp-content/plugins/civicrm/civicrm.php:1199 { ?~@?}
        /home/wf/sites/default/wp-content/plugins/civicrm/includes/civicrm.basepage.php:380 { ?~@?}
        /home/wf/sites/default/wp-includes/class-wp-hook.php:307 { ?~@?}
        /home/wf/sites/default/wp-includes/class-wp-hook.php:331 { ?~@?}
        /home/wf/sites/default/wp-includes/plugin.php:524 { ?~@?}
        /home/wf/sites/default/wp-includes/class-wp.php:787 { ?~@?}
        /home/wf/sites/default/wp-includes/functions.php:1330 { ?~@?}
        /home/wf/sites/default/wp-blog-header.php:16 { ?~@?}
        /home/wf/sites/default/index.php:17 { ?~@?}
      }
    }
  ]
  </code></pre>
  <p>I'm now at a loss as to how to begin resolving this.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-10-19T20:55:18.953Z
Comments.Text: Now that you've shifted to the shortcode, are users still reporting the issue?  We've seen this previously on WP when using the direct Civi register link (not embedding the form in a WP page); going the shortcode route was the only way we found to resolve it.  (We also confirmed the clean URL settings were good, etc.)
Comments.UserDisplayName: Lesley Carter - BackOffice
Tags: <civievent>
Title: CiviEvent - Fatal error when registering: Could not find valid value for id
ThreadText: # CiviEvent - Fatal error when registering: Could not find valid value for id
  
  (Asked by: username_0 on 2022-10-19)
  
  I have a simple and largely up to date Wordpress 6.02/Civi 5.53 site running registrations for a single paid event. I'm taking payments using the Stripe extension. It couldn't get much more straightforward.
  However I'm seeing an error "Could not find valid value for id" that is stopping some people from registering.
  I've checked through other posts here on this issue, including:
  CiviEvent - Error when registering: Could not find valid value for id
  and
  "Could not find valid value for id" after event registration on WordPress 5.9.1 and CiviCRM 5.47.2
  and I can't see anything wrong with my set-up. Clean URLs, base page, permalinks are all good. I'm not using a shortcode for the event registration form.
  It looks like the majority of registrations are working fine, but I've had a few people get in touch reporting the error.
  Here's what gets logged:
  $Fatal Error Details = array:3 [
    "message" => "Could not find valid value for id"
    "code" => null
    "exception" => CRM_Core_Exception {#6388
      -errorData: array:1 [
        "error_code" => 0
      ]
      #cause: null
      -_trace: null
      #message: "Could not find valid value for id"
      #code: 0
      #file: "/home/wf/sites/default/wp-content/plugins/civicrm/civicrm/CRM/Utils/Request.php"
      #line: 98
      trace: {
        /home/wf/sites/default/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/wf/sites/default/wp-content/plugins/civicrm/civicrm/CRM/Event/StateMachine/Registration.php:27 { ?~@?}
        /home/wf/sites/default/wp-content/plugins/civicrm/civicrm/CRM/Event/Controller/Registration.php:27 { ?~@?}
        /home/wf/sites/default/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:314 { ?~@?}
        /home/wf/sites/default/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 { ?~@?}
        /home/wf/sites/default/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { ?~@?}
        /home/wf/sites/default/wp-content/plugins/civicrm/civicrm.php:1199 { ?~@?}
        /home/wf/sites/default/wp-content/plugins/civicrm/includes/civicrm.basepage.php:380 { ?~@?}
        /home/wf/sites/default/wp-includes/class-wp-hook.php:307 { ?~@?}
        /home/wf/sites/default/wp-includes/class-wp-hook.php:331 { ?~@?}
        /home/wf/sites/default/wp-includes/plugin.php:524 { ?~@?}
        /home/wf/sites/default/wp-includes/class-wp.php:787 { ?~@?}
        /home/wf/sites/default/wp-includes/functions.php:1330 { ?~@?}
        /home/wf/sites/default/wp-blog-header.php:16 { ?~@?}
        /home/wf/sites/default/index.php:17 { ?~@?}
      }
    }
  ]
  
  I'm now at a loss as to how to begin resolving this.
  
  **Tags:** civievent
  
  > **Comments:**
  > **username_1**: Now that you've shifted to the shortcode, are users still reporting the issue?  We've seen this previously on WP when using the direct Civi register link (not embedding the form in a WP page); going the shortcode route was the only way we found to resolve it.  (We also confirmed the clean URL settings were good, etc.)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2022-10-19. Score: 0
  
  Can you check your civicrm.settings.php have exact below code for clean url?
  if (!defined('CIVICRM_CLEANURL')) {
    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);
    }
  }
  
  
  ---
  
  