Answers.Body: <p>For anyone experiencing this issue the fix <a href="https://civicrm.stackexchange.com/a/40996/13407">https://civicrm.stackexchange.com/a/40996/13407</a> by @bgm seems to have solved the problem.  At least so far.  Speficially the way we were handling permalinks was causing issue with the CiviCRM confirmation process/url for payment form submissions.</p>
  <p>re.</p>
  <p>Make sure that the civicrm.settings.php has this bit of code:</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-03-25T21:30:25.047Z
Answers.LastActivityDate: 2022-03-25T21:30:25.047Z
Answers.UserDisplayName: 1cor22
Body: <p>We recently upgraded to CiviCRM 5.47.2 and now all of our payment forms are displaying the following error when users submit for payment.</p>
  <pre><code>Your browser session has expired and we are unable to complete your form submission. We have returned you to the initial step so you can complete and resubmit the form. If you experience continued difficulties, please contact us for assistance.
  </code></pre>
  <p>This is on WordPress, CiviCRM 5.47.2.  We have never had this issue before and all payment forms seem to trigger the invalidKeyRedirect function.  Nothing has changed on any of our payment forms or code outside of the Civi upgrade.  Even though this error is displayed the transactions still process causing the user to re-submit the form and creating multiple transactions.</p>
  <p>I am not seeing any issues in the error logs as test form submissions show &quot;updated successfully&quot; and &quot;Receipt sent&quot; even though I am getting the error on the page.</p>
  <p>I also noticed that on the form submission prior to the upgrade the confirmation url would display &quot;?civiwp=CiviCRM&amp;q=civicrm%2Fcontribute%2Ftransact&amp;_qf_ThankYou_display=true&amp;qfKey=####&quot; and since the upgrade the thank you and qfKey are not displaying re. &quot;?civiwp=CiviCRM&amp;q=civicrm%2Fcontribute%2Ftransact&amp;id=10&amp;reset=1&quot;</p>
  <p>Any help would be appreciated.</p>
  
Tags: <wordpress><civicontribute><contributions><forms><session>
Title: Payment Form Errors "Your browser session has expired and we are unable to complete your form submission" after upgrade to 5.47.2
ThreadText: # Payment Form Errors "Your browser session has expired and we are unable to complete your form submission" after upgrade to 5.47.2
  
  (Asked by: username_0 on 2022-03-25)
  
  We recently upgraded to CiviCRM 5.47.2 and now all of our payment forms are displaying the following error when users submit for payment.
  
  ```
  Your browser session has expired and we are unable to complete your form submission. We have returned you to the initial step so you can complete and resubmit the form. If you experience continued difficulties, please contact us for assistance.
  
  ```
  
  This is on WordPress, CiviCRM 5.47.2. We have never had this issue before and all payment forms seem to trigger the invalidKeyRedirect function. Nothing has changed on any of our payment forms or code outside of the Civi upgrade. Even though this error is displayed the transactions still process causing the user to re-submit the form and creating multiple transactions.
  
  I am not seeing any issues in the error logs as test form submissions show "updated successfully" and "Receipt sent" even though I am getting the error on the page.
  
  I also noticed that on the form submission prior to the upgrade the confirmation url would display "?civiwp=CiviCRM&q=civicrm%2Fcontribute%2Ftransact&\_qf\_ThankYou\_display=true&qfKey=####" and since the upgrade the thank you and qfKey are not displaying re. "?civiwp=CiviCRM&q=civicrm%2Fcontribute%2Ftransact&id=10&reset=1"
  
  Any help would be appreciated.
  
  **Tags:** wordpress, civicontribute, contributions, forms, session
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2022-03-25. Score: 2
  
  For anyone experiencing this issue the fix <https://civicrm.stackexchange.com/a/40996/13407> by @bgm seems to have solved the problem. At least so far. Speficially the way we were handling permalinks was causing issue with the CiviCRM confirmation process/url for payment form submissions.
  
  re.
  
  Make sure that the civicrm.settings.php has this bit of code:
  
  ```
  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);
      }
    }
  
  ```
  
  
  ---
  
  