0

Help needed. The error below is received when I click on the submit button for a petition (survey). This function has been working fine for several months. There are no customisations in place in this area. Wordpress was updated to 5.5.1. - The error only occurred since this last upgrade occurred. CiviCRM 5.27.1 PHP 7.3.17

(
    [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] => 
)


Sep 04 14:04:55  [debug] $backTrace = #0 /home/cremorne/www/www/devwp2/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(354): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /home/cremorne/www/www/devwp2/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(817): CRM_Core_Error::fatal("We can't load the requested web page. This page requires cookies to be enable...")
#2 /home/cremorne/www/www/devwp2/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(812): CRM_Core_Controller->invalidKeyCommon()
#3 /home/cremorne/www/www/devwp2/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(296): CRM_Core_Controller->invalidKey()
#4 /home/cremorne/www/www/devwp2/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(190): CRM_Core_Controller->key("CRM_Campaign_Form_Petition_Signature", TRUE, FALSE)
#5 /home/cremorne/www/www/devwp2/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller/Simple.php(50): CRM_Core_Controller->__construct("Sign Petition", TRUE, NULL, "CRM_Campaign_Form_Petition_Signature", TRUE, FALSE)
#6 /home/cremorne/www/www/devwp2/wp-content/plugins/civicrm/civicrm/CRM/Utils/Wrapper.php(62): CRM_Core_Controller_Simple->__construct("CRM_Campaign_Form_Petition_Signature", "Sign Petition", NULL, FALSE, FALSE, FALSE, FALSE)
#7 /home/cremorne/www/www/devwp2/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(285): CRM_Utils_Wrapper->run("CRM_Campaign_Form_Petition_Signature", "Sign Petition", (Array:0))
#8 /home/cremorne/www/www/devwp2/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:14))
#9 /home/cremorne/www/www/devwp2/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:3))
#10 /home/cremorne/www/www/devwp2/wp-content/plugins/civicrm/civicrm.php(1537): CRM_Core_Invoke::invoke((Array:3))
#11 /home/cremorne/www/www/devwp2/wp-content/plugins/civicrm/includes/civicrm.basepage.php(352): CiviCRM_For_WordPress->invoke()
#12 /home/cremorne/www/www/devwp2/wp-includes/class-wp-hook.php(287): CiviCRM_For_WordPress_Basepage->basepage_handler(Object(WP))
#13 /home/cremorne/www/www/devwp2/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, (Array:1))
#14 /home/cremorne/www/www/devwp2/wp-includes/plugin.php(544): WP_Hook->do_action((Array:1))
#15 /home/cremorne/www/www/devwp2/wp-includes/class-wp.php(758): do_action_ref_array("wp", (Array:1))
#16 /home/cremorne/www/www/devwp2/wp-includes/functions.php(1285): WP->main("")
#17 /home/cremorne/www/www/devwp2/wp-blog-header.php(16): wp()
#18 /home/cremorne/www/www/devwp2/index.php(17): require("/home/cremorne/www/www/devwp2/wp-blog-header.php")
#19 {main}
  • Have cleared cache, reviewed base URL paths and all OK. There have been no changes except for Wordpress being upgraded to 5.5.1 from 5.5. – Garry Hyman Sep 4 at 5:23
  • Is there a reason not to upgrade to the latest CiviCRM? FWIW, I just successfully submitted a petition in WordPress 5.5.1 & CiviCRM 5.29.0 – Christian Wach Sep 4 at 17:26
  • Thanks for your reply Christian.The usual responses for NOT upgrading apply: we just got to 5.27.1 in the last few weeks. Have a critical time period now so don't want to upset the applecart by upgrading right now. Having said that I have tried – Garry Hyman Sep 6 at 1:32
  • Time is always precious and short. Having said that I have tried upgrading a test environment 5.27.1 to 5.29 and the upgrade screen is presented to me but when I click the upgrade button it thinks for a moment and then just takes me to the homepage. The [civicrm.files] variable is correct and aligns so I am puzzled. Have tried adding a Global Paths for URL to civicrm.settings and no luck. Any thoughts here? I am sure it has something to do with the [civicrm.files] variable. We installed prior to version 4.7 so the calculation around this seem to be causing this issue. – Garry Hyman Sep 6 at 1:40
  • Have migrated files as per upgrade instructions too. This is so frustrating sometimes! – Garry Hyman Sep 6 at 1:40
0

Have been able to get over the session key error by installing a fresh install of WP and CiviCRM, then restoring Wordpress and CiviCRM DBs, repointing wp_config.php and CiviCRM.settings.php. Also had to rename my table prefixes in wp_config.php to match my restored tables. The caches get created once you start up CiviCRM and do things. Testing so far all functionality is working again. Hopefully this may help someone should you come across this issue which is pretty horrible.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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