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 »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Drupal's famous "infinte loop" login
Pages: [1]

Author Topic: Drupal's famous "infinte loop" login  (Read 4089 times)

ThePayIsLousy

  • Guest
Drupal's famous "infinte loop" login
September 02, 2010, 06:31:05 pm
This is purely a Drupal issue (I'm pretty sure), but I'm hoping it's OK to post it here.  After all, CiviCRM sits on top of Drupal.  While I really, really like CiviCRM, I have a Drupal problem that may cause me to have to look elsewhere for a solution...

I know this problem was supposedly fixed ages ago, but it still exists in Drupal 6.19 and is driving me (and some of my users) crazy.

--User creates account.

--Instead of moving on to the authenticated user screen, user receives login box screen with blank id and pw fields.

--Entering the id and pw and submitting yields the same result -- login box screen w/ blank fields. [But, I can see that the user has actually authenticated.]

I have completely disabled caching, cleared the cache and tried the "no-store" bootstrap.inc hack.

Affects about 10-15% of my users (some don't complain, they just give up and use paper forms -- but I can see multiple sessions started at the same time using Who's On and by checking the log).

The Who's On module often shows multiple instances of the user logged on (i.e. authenticated) while the user just keeps seeing the login box w/ the blank fields.

All of the solutions I've Googled up (except the bootstrap.inc hack) seem to be targeted at earlier versions of Drupal. However, it's very clear that many 6.x users are having this problem.

Possible very, very ugly workaround: users filling out the wwww.xxxxxxxxx.org/user/password form seem to be able to authenticate by using the e-mail-supplied reset link. But, by that time, they're not very happy with me or my system.

Any advice you can provide would be greatly appreciated. Drupal/CiviCRM works perfectly for my needs (high school parent teacher group), but this is a dealbreaker -- I can't frustrate 10-15% of my user base next year.

Thank you!

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: Drupal's famous "infinte loop" login
September 02, 2010, 07:18:25 pm

hey mike:

does the page: www.example.org/user/login and example.org/user/login both go to the login page?

if so, u might want to redirect www.example.org to example.org and just use that as the canonical url for the entire site

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

ThePayIsLousy

  • Guest
Re: Drupal's famous "infinte loop" login
September 02, 2010, 08:01:12 pm
Quote from: Donald Lobo on September 02, 2010, 07:18:25 pm
does the page: www.example.org/user/login and example.org/user/login both go to the login page?
Hi, lobo,

Yep -- they both do.

Quote
if so, u might want to redirect www.example.org to example.org and just use that as the canonical url for the entire site
You mean by using .htaccess magic, like:

Redirect 301 / http://www.example.org/

Is that the only change you're suggesting?  Why do you think canonicalization will help w/ this issue?

Thank you very much -- I'll try whatever you suggest!

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: Drupal's famous "infinte loop" login
September 02, 2010, 08:15:25 pm

check your drupal's .htaccess and search for

  # If your site can be accessed both with and without the 'www.' prefix, you
  # can use one of the following settings to redirect users to your preferred
  # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:

its basically to do with the cookie domain etc (there are other solutions also), but having just one url seems to be nice and clean (and it works!)

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

ThePayIsLousy

  • Guest
Re: Drupal's famous "infinte loop" login
September 02, 2010, 09:29:33 pm
thanks, lobo -- done!  Picked the first one, point everything to www, since that's what all of my Drupal nav links and exposed CiviCRM profiles use.

If this works, I'll document it in about 20 places! 

As far as I know, everyone is already accessing my site with "www" -- I provide a clickable link on a Web site, so no one s/be manually typing in the URL w/o the www.  Is your theory that some people are using a link w/o the www (or that their ISP, browser, etc. is stripping the www for some reason)?

ThePayIsLousy

  • Guest
Re: Drupal's famous "infinte loop" login
September 03, 2010, 08:13:24 am
lobo,

Unfortunately, no change in behavior.  I even tried changing the Rewritebase, too (after I confirmed the problem still existed).

Quote
RewriteCond %{HTTP_HOST} ^mysite\.com$ [NC]
RewriteRule ^(.*)$ http://www.mysite.com/$1 [L,R=301]

RewriteBase /mydrupalsubdir

Checked the Drupal logs -- all locations and referrers use the www prefix.

Thanks for trying!  Any other ideas?  No responses to my posts on Drupal forums, unfortunately. 

ThePayIsLousy

  • Guest
Re: Drupal's famous "infinte loop" login
September 03, 2010, 01:23:55 pm
One other oddity: after implementing the Rewrite rules, it seems that sess_<random alphanumeric character string> were generated on my *server* root for some users.  They all contain this:

CiviCRM|a:1:{s:20:"defaultWysiwygEditor";s:1:"2";}

Another weirdity.  Does it make any sense to anyone?  I was wondering if it's a clue...

ThePayIsLousy

  • Guest
Re: Drupal's famous "infinte loop" login
September 06, 2010, 06:49:23 pm
Didn't have any luck getting support over at the Drupal forums.  One thing I did find out: a whole bunch of people have dumped Drupal over the years b/c of its defective authentication system.  I'm next, unfortunately.

Here's my 2010 workaround.  For 2011, I guess I'll give Joomla a try -- sure hate to give up on CiviCRM, a wonderful package that meets all of my needs.

--I had my system set up to allow users to automatically log in after account creation.  There is no reason to force e-mail verification, since registration is a one-time event.

-The problem I'm experiencing is that anonymous session cookies don't properly turn into authenticated cookies.  [It doesn't happen to everyone, it happens to both IE and FF users, and clearing all cookies fixes it by wiping out the anonymous session cookie.]  The problem is well-documented -- the various reasons and various fixes not so much.

--So, I created an A record for a subdomain pointing at my www root (leaving me w/, e.g., www.mysite.com and sub.mysite.com both pointing to my www root).

--I then published sub.mysite.com as the starting point for account creation.

--The Drupal account creation e-mail w/ the username and pw contains a link to www.mysite.com.  So, when the user logs in, there is no conflict with the old sub.mysite.com anonymous session cookie.

Ugly...

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Drupal's famous "infinte loop" login
September 10, 2010, 04:38:57 am
Quote from: Mike Stein on September 06, 2010, 06:49:23 pm
For 2011, I guess I'll give Joomla a try -- sure hate to give up on CiviCRM, a wonderful package that meets all of my needs.

You are aware that CiviCRM is also a Joomla module, right?
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

ThePayIsLousy

  • Guest
Re: Drupal's famous "infinte loop" login
September 10, 2010, 05:11:00 am
Piotr,

Yep, thanks -- that's why I'll give Joomla a try.

Drupal has been a disaster for me -- and I'm sure not alone.  I wish that I had done more due diligence.  I was focused on the Drupal v. Joomla feature comparison -- and Drupal seems to win that by a mile.  I didn't look into the quality of support, the serious bugs that take several years to exterminate, the scary back-and-forth on their issue boards that reminds me of high school kids working on a class project, etc.  CiviCRM is also donationware, but critical issues seem to be taken very seriously and professionally here.

Suffice to say that I have asked my organization to make a small donation to CiviiCRM (approved, I just have to submit the paperwork later in the fall), but I won't be requesting anything for Drupal.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Drupal's famous "infinte loop" login

This forum was archived on 2017-11-26.