Answers.Body: <p>May be your civicrm.settings.php is missing permalink_structure check?</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: 2024-02-18T08:06:55.927Z
Answers.Text: This code does exist in the file, exactly as you've stated it here. I cannot imagine how that could be missing; we aren't writing that file ourselves, it is generated.
Answers.UserDisplayName: Torben Gundtofte-Bruun
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-02-18T16:53:11.470Z
Answers.Text: This might be anything else but the cookies indeed, have seen this a lot before. Please check your web server logs and php error logs and civicrm error logs in the /ConfigAndLog for any oddities.
Answers.UserDisplayName: yurg
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-02-17T23:09:22.030Z
Answers.LastActivityDate: 2024-02-17T23:09:22.030Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>My <strong>System Status</strong> page says &quot;The site is running <strong>5.69.2</strong>&quot; but the Civi footer on the same page and WP's plugins page say version <strong>5.69.5</strong> - clearly an upgrade has gone wrong!</p>
  <p>Now, several pages in our CiviCRM are throwing errors but the error is about cookies and I'm pretty sure that's not the actual cause: <code>We can't load the requested web page. This page requires cookies to be enabled in your browser settings.</code></p>
  <p>The log also contains <code>Unexpected error while rendering a file in the AssetBuilder: Unrecognized asset name: angular-modules.js</code></p>
  <p>These errors have pretty severe effects: Pages affected include <strong>clearing cache</strong> (and the cache is not cleared); <strong>System &gt; Debugging</strong> when trying to turn on debugging (remains off); create or <strong>edit a contact</strong>; create or edit a <strong>CiviEvent,</strong> and more.</p>
  <p>What steps can I take to identify and fix the root cause?</p>
  <p>CiviCRM 5.69.2 / 5.69.5<br />
  WordPress 6.4.3<br />
  PHP 8.2.15<br />
  nginx on VPS hosted Linux</p>
  <p>When I do this:<br />
  <a href="https://i.sstatic.net/GC5cs.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/GC5cs.png" alt="enter image description here" /></a>
  I get this:<br />
  <a href="https://i.sstatic.net/8n1uj.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/8n1uj.png" alt="enter image description here" /></a></p>
  <h4>wp-content/uploads/civicrm/ConfigAndLog/CiviCRM.[...].log</h4>
  <p><em>Note: I have replaced the actual site domain with <code>my.domain.tld</code>.</em></p>
  <pre><code>2024-02-17 22:16:20+0100  [error]
  $Fatal Error Details = array:3 [
    &quot;message&quot; =&gt; &quot;We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.&lt;br /&gt;&lt;br /&gt;Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.&lt;br /&gt;&lt;br /&gt;Error type: Could not find a valid session key.&quot;
    &quot;code&quot; =&gt; null
    &quot;exception&quot; =&gt; CRM_Core_Exception {#2624
      #message: &quot;We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.&lt;br /&gt;&lt;br /&gt;Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.&lt;br /&gt;&lt;br /&gt;Error type: Could not find a valid session key.&quot;
      #code: 0
      #file: &quot;/var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php&quot;
      #line: 861
      #cause: null
      -_trace: null
      -errorData: array:1 [
        &quot;error_code&quot; =&gt; 0
      ]
      trace: {
        /var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:861 {
          CRM_Core_Controller-&gt;invalidKeyCommon()
          ›   $msg = ts(&quot;We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.&quot;) . '&lt;br /&gt;&lt;br /&gt;' . ts('Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.') . '&lt;br /&gt;&lt;br /&gt;' . ts('Error type: Could not find a valid session key.');
          ›   throw new CRM_Core_Exception($msg);
          › }
        }
        /var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:856 { …}
        /var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:316 { …}
        /var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:193 { …}
        /var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller/Simple.php:49 { …}
        /var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/Wrapper.php:61 { …}
        /var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:292 { …}
        /var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 { …}
        /var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { …}
        /var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm.php:1231 { …}
        /var/www/vhosts/my.domain.tld/httpdocs/wp-includes/class-wp-hook.php:324 { …}
        /var/www/vhosts/my.domain.tld/httpdocs/wp-includes/class-wp-hook.php:348 { …}
        /var/www/vhosts/my.domain.tld/httpdocs/wp-includes/plugin.php:517 { …}
        /var/www/vhosts/my.domain.tld/httpdocs/wp-admin/admin.php:259 { …}
      }
    }
  ]
  
  
  2024-02-17 22:16:20+0100  [debug] $backTrace = #0 /var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(443): CRM_Core_Error::backtrace(&quot;backTrace&quot;, TRUE)
  #1 /var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(39): CRM_Core_Error::handleUnhandledException(Object(CRM_Core_Exception))
  #2 /var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm.php(1231): CRM_Core_Invoke::invoke((Array:4))
  #3 /var/www/vhosts/my.domain.tld/httpdocs/wp-includes/class-wp-hook.php(324): CiviCRM_For_WordPress-&gt;invoke(&quot;&quot;)
  #4 /var/www/vhosts/my.domain.tld/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook-&gt;apply_filters(&quot;&quot;, (Array:1))
  #5 /var/www/vhosts/my.domain.tld/httpdocs/wp-includes/plugin.php(517): WP_Hook-&gt;do_action((Array:1))
  #6 /var/www/vhosts/my.domain.tld/httpdocs/wp-admin/admin.php(259): do_action(&quot;toplevel_page_CiviCRM&quot;)
  #7 {main}
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-02-19T10:12:12.863Z
Comments.Text: Try `wp civicrm core update-db --vv` from the command line if you have WP-CLI installed - it'll give you more info than the web UI.
Comments.UserDisplayName: Christian Wach
Tags: <upgrade><installation><debugging><setup>
Title: Failed upgrade from 5.69.2 to 5.69.5
ThreadText: # Failed upgrade from 5.69.2 to 5.69.5
  
  (Asked by: username_0 on 2024-02-17)
  
  My System Status page says "The site is running 5.69.2" but the Civi footer on the same page and WP's plugins page say version 5.69.5 - clearly an upgrade has gone wrong!
  Now, several pages in our CiviCRM are throwing errors but the error is about cookies and I'm pretty sure that's not the actual cause: We can't load the requested web page. This page requires cookies to be enabled in your browser settings.
  The log also contains Unexpected error while rendering a file in the AssetBuilder: Unrecognized asset name: angular-modules.js
  These errors have pretty severe effects: Pages affected include clearing cache (and the cache is not cleared); System > Debugging when trying to turn on debugging (remains off); create or edit a contact; create or edit a CiviEvent, and more.
  What steps can I take to identify and fix the root cause?
  CiviCRM 5.69.2 / 5.69.5
  WordPress 6.4.3
  PHP 8.2.15
  nginx on VPS hosted Linux
  When I do this:
  
  I get this:
  
  wp-content/uploads/civicrm/ConfigAndLog/CiviCRM.[...].log
  Note: I have replaced the actual site domain with my.domain.tld.
  2024-02-17 22:16:20+0100  [error]
  $Fatal Error Details = array:3 [
    "message" => "We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.Error type: Could not find a valid session key."
    "code" => null
    "exception" => CRM_Core_Exception {#2624
      #message: "We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.Error type: Could not find a valid session key."
      #code: 0
      #file: "/var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php"
      #line: 861
      #cause: null
      -_trace: null
      -errorData: array:1 [
        "error_code" => 0
      ]
      trace: {
        /var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:861 {
          CRM_Core_Controller->invalidKeyCommon()
          ›   $msg = ts("We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.") . '' . ts('Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.') . '' . ts('Error type: Could not find a valid session key.');
          ›   throw new CRM_Core_Exception($msg);
          › }
        }
        /var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:856 { …}
        /var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:316 { …}
        /var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:193 { …}
        /var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller/Simple.php:49 { …}
        /var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/Wrapper.php:61 { …}
        /var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:292 { …}
        /var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 { …}
        /var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { …}
        /var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm.php:1231 { …}
        /var/www/vhosts/my.domain.tld/httpdocs/wp-includes/class-wp-hook.php:324 { …}
        /var/www/vhosts/my.domain.tld/httpdocs/wp-includes/class-wp-hook.php:348 { …}
        /var/www/vhosts/my.domain.tld/httpdocs/wp-includes/plugin.php:517 { …}
        /var/www/vhosts/my.domain.tld/httpdocs/wp-admin/admin.php:259 { …}
      }
    }
  ]
  
  
  2024-02-17 22:16:20+0100  [debug] $backTrace = #0 /var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(443): CRM_Core_Error::backtrace("backTrace", TRUE)
  #1 /var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(39): CRM_Core_Error::handleUnhandledException(Object(CRM_Core_Exception))
  #2 /var/www/vhosts/my.domain.tld/httpdocs/wp-content/plugins/civicrm/civicrm.php(1231): CRM_Core_Invoke::invoke((Array:4))
  #3 /var/www/vhosts/my.domain.tld/httpdocs/wp-includes/class-wp-hook.php(324): CiviCRM_For_WordPress->invoke("")
  #4 /var/www/vhosts/my.domain.tld/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters("", (Array:1))
  #5 /var/www/vhosts/my.domain.tld/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action((Array:1))
  #6 /var/www/vhosts/my.domain.tld/httpdocs/wp-admin/admin.php(259): do_action("toplevel_page_CiviCRM")
  #7 {main}
  
  **Tags:** upgrade, installation, debugging, setup
  
  > **Comments:**
  > **username_1**: Try `wp civicrm core update-db --vv` from the command line if you have WP-CLI installed - it'll give you more info than the web UI.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2024-02-17. Score: 0
  
  May be your civicrm.settings.php is missing permalink_structure check?
  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);
    }
  }
  
  > **Comments:**
  > **username_0**: This code does exist in the file, exactly as you've stated it here. I cannot imagine how that could be missing; we aren't writing that file ourselves, it is generated.  
  > **username_3**: This might be anything else but the cookies indeed, have seen this a lot before. Please check your web server logs and php error logs and civicrm error logs in the /ConfigAndLog for any oddities.  
  
  ---
  
  