CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Contribute Cookie Error in Firefox, IE8, Opera, and Chrome (Safari okay)
Pages: [1]

Author Topic: Contribute Cookie Error in Firefox, IE8, Opera, and Chrome (Safari okay)  (Read 4353 times)

menasor2782

  • Guest
Contribute Cookie Error in Firefox, IE8, Opera, and Chrome (Safari okay)
May 08, 2010, 09:09:20 pm
Hello: I put up my live contribution page, and tested it on my joomla powered CMS site. After I filled out the beginning information and hit 'next' i get this:

"Sorry. A non-recoverable error has occurred.

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 adminstrator for assistance.

Error type: Could not find a valid key."


Cookies are enabled on both my MAC (firefox, opera, chrome) and Windows 7 (IE 8) computers.

I checked the payment processor name and type. It's paypal standard. Under live i have the actual paypal email. I did not put anything for the page urls below that. In the test area i have my paypal sand box email and the default web pages there.

Civicontribute is enabled under system settings.

I'm unsure how to fix it. Past posts don't give a definitive answer.
« Last Edit: May 09, 2010, 03:19:51 pm by menasor2782 »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Contribution page/Paypal problem
May 09, 2010, 03:07:20 pm

check the urls before and after you hit submit. Basically make sure you are using the same url everywhere:

i.e. example.com OR www.example.com not a mixture

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

menasor2782

  • Guest
Re: Contribute Cookie Error in Firefox, IE8, Opera, and Chrome (Safari okay)
May 09, 2010, 03:27:03 pm
It does switch from www.example.com to example.com. Where do I tell it not to do this?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Contribute Cookie Error in Firefox, IE8, Opera, and Chrome (Safari okay)
May 09, 2010, 04:44:39 pm

the easiest way would be to use an apache redirect from example.com to www.example.com

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

menasor2782

  • Guest
Re: Contribute Cookie Error in Firefox, IE8, Opera, and Chrome (Safari okay)
May 11, 2010, 10:47:17 am
Resolved the issue using an apache redirect, and formatting the url settings in civiCRM. Thank you,

sanchez

  • I’m new here
  • *
  • Posts: 16
  • Karma: 0
Re: Contribute Cookie Error in Firefox, IE8, Opera, and Chrome (Safari okay)
June 15, 2010, 06:07:34 am
Quote from: Donald Lobo on May 09, 2010, 04:44:39 pm

the easiest way would be to use an apache redirect from example.com to www.example.com

lobo


This has been a recurring problem, that interferes with site administration policies. It already caught me twice.
I´d rather take a look into CiviCRM code and try to fix it right in there - any clues?

Apis more modoque

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: Contribute Cookie Error in Firefox, IE8, Opera, and Chrome (Safari okay)
June 27, 2010, 06:54:35 pm
In this case, CiviCRM has issued a redirect, at which point it uses the configured site URL in civicrm.settings.php.

When you first browsed to the site, you accessed via a different server (eg, CiviCRM is configured for www.example.com but being a lazy developer we all type example.com and save four letters).

This causes a conflict when the redirect is fired. The simple fix (and better for your site generally) is to use Canonical URLs and ensure all visitors access by the same hostname. (IMO www.example.com is superior, for advantages in browser UI, even though I agree that the www. prefix is generally pointless.)

In your situation, I'd set up an Apache redirect to ensure all visitors see 'www.example.com' all the time.

I use this myself (in your Apache config) -
Code: [Select]
RewriteEngine On
RewriteCond %{HTTP_HOST}   !^www\.example\.com [NC]
RewriteCond %{HTTP_HOST}   !^$
RewriteRule ^/(.*)         http://www.example.com/$1 [L,R]

According to Chris Hope's ElectricToolbox article on the use of WWW in website addresses above, this should work too, but I haven't tried it myself.
Code: [Select]
RedirectMatch permanent .* http://www.example.com/



@xurizaemon ● www.fuzion.co.nz

luthien

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Joomla 2.5
  • MySQL version: 5.1
  • PHP version: 5.2.17
Re: Contribute Cookie Error in Firefox, IE8, Opera, and Chrome (Safari okay)
May 13, 2012, 12:06:59 pm
I'm having the same problem using Joomla 2.5/CiviCRM 4.1+, I added the settings to apache. My url in settings.php does not has the www. The apache redirect is to the non-www, but I still get the errors. Please advice.

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: Contribute Cookie Error in Firefox, IE8, Opera, and Chrome (Safari okay)
May 13, 2012, 04:57:24 pm
luthien, if you're using the redirect i posted above, you need to ensure that the redirect is pointing to the same canonical url that civicrm is using.

post with details if you want informed replies (eg "i added the following config snippet to apache [ ... ], and my civicrm.settings.php has [ ... ]").

it may be simpler to remove the apache config and find a canonical url plugin for your CMS ... apache config alterations cut a bit deeper, so you want to be sure of what you're doing
@xurizaemon ● www.fuzion.co.nz

luthien

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Joomla 2.5
  • MySQL version: 5.1
  • PHP version: 5.2.17
Re: Contribute Cookie Error in Firefox, IE8, Opera, and Chrome (Safari okay)
May 13, 2012, 07:26:24 pm
I tried out the apache suggestion from this post but it did not worked out for me. Please let me know if you notice any other errors. thanks.

apache config:
Code: [Select]
RewriteEngine On
RewriteCond %{HTTP_HOST} !^mysite\.org$ [NC]
RewriteRule ^(.*)$ http://mysite.org/$1 [R=301,L]

in Joomla:
Code: [Select]
/administrator/components/com_civicrm/civicrm.settings.php

define( 'CIVICRM_UF_BASEURL'      , 'http://mysite.org/administrator/' );

/components/com_civicrm/civicrm.settings.php

define( 'CIVICRM_UF_BASEURL'      , 'http://mysite.org/' );

Joomla configuration file:
Code: [Select]
public $live_site = 'http://mysite.org';
public $sef = '0';
public $sef_rewrite = '0';
public $sef_suffix = '0';
public $unicodeslugs = '0';
public $cookie_domain = '';
public $cookie_path = '';

Joomla 2.5.4 and civicrm 4.1.1

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: Contribute Cookie Error in Firefox, IE8, Opera, and Chrome (Safari okay)
May 14, 2012, 05:02:50 am
Sorry luthien, that looks ok to me at a glance. You may have to debug a bit further ... lots of things (other than hostnames) may affect browser cookies. Might be best to start a new thread, and describe the issue you're having in as much detail as you can - you can link back to this one for reference, but it appears that the fix which solved the issues for menasor (OP of this thread) is not the fix for you :(
@xurizaemon ● www.fuzion.co.nz

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Contribute Cookie Error in Firefox, IE8, Opera, and Chrome (Safari okay)

This forum was archived on 2017-11-26.