1

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:
enter image description here I get this:
enter image description here

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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.") . '<br /><br />' . 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.') . '<br /><br />' . 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}
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. Feb 19 at 10:12

1 Answer 1

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);
  }
}
2
  • 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. Feb 18 at 8:06
  • 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.
    – yurg
    Feb 18 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.