The Javascript cookie detection needs to add the path=/ so that when the detection is done on one page, that it is available on another page. I discovered this while writing a new module (reindex) that uses the Batch API. The Batch API was not properly detecting that I had javascript enabled because (a) the detection was done on admin/build/modules and thus the path for the cookie "has_js" was "admin/build", and (b) batch API is handled on on the path "batch", which isn't under "admin/build".

This one line patch fixes the problem.

I've marked the issue as "critical" because batch API is pretty broken without it.

CommentFileSizeAuthor
cookie-path.patch587 bytesdouggreen
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chx’s picture

Status: Needs review » Reviewed & tested by the community
chx’s picture

Also see http://drupal.org/node/177927 which arrived to the same solution.

chx’s picture

Title: Javascript cookie detection wrongly sets path to current directory » Breaker: javascript cookie detection wrongly sets path to current directory
Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Looks right, thanks, committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)