0

Our CiviCRM works with Worpress. We have a newsletter subscription form, and also use event registration, and contribution pages for donation. Our visitors randomly receive this error:

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.

We have tried almost any solution we have found on this forum, removing enforcing https, making sure URLs are correct etc... and still it randomly appears for some visitors.

Our site is behind CloudFlare but we are exempting it from caching and security rules with custom rules.

Can you suggest a way to trace this issue out? I will highly appreciate it as we have already spent many hours on this issue with no luck.

3
  • 1
    per this answer have you confirmed folk are not being jumped from www to no-www etc civicrm.stackexchange.com/questions/14377/…
    – petednz - fuzion
    Commented Jul 19 at 22:10
  • What have they just done before getting that error? Eg is this when they open the registration form, complete a contribution etc.What payment processor are you using? Does it take you away from the site and redirect back with a different URL? The browser's developer tools showing network traffic may help.
    – Aidan
    Commented Jul 23 at 6:59
  • Yes. There is no jumping between www to no-www and also from http to https. It's all domainname.name
    – Kamyar
    Commented Jul 23 at 10:29

1 Answer 1

1

The most common cause of this is a redirect happening before CiviCRM renders the page. Typically what I do in these situations is to log every request in wp-settings.php, just before plugins_loaded - something like:

error_log( print_r( [
  'NEW-REQUEST' => '======================================================================',
  'REQUEST_URI' => $_SERVER['REQUEST_URI'],
  'REQUEST_TIME_FLOAT' => $_SERVER['REQUEST_TIME_FLOAT'],
  'POST' => $_POST,
  'END-REQUEST' => '======================================================================',
], true ) );

This should make each request obvious in your logs.

Next, I'd pepper redirect_canonical() with similar logging code to see if it is fixing and redirecting malformed URLs.

Happy sleuthing.

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.