Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Into misc/drupal.js JS create a cookie but this ignore domain and path settings available into settings.php.
Attached patch correctly set path and domain for has_js cookie.
Comment | File | Size | Author |
---|---|---|---|
#2 | 844282-cookie-has_js-path-domain.diff | 2.44 KB | mavimo |
has_js_path_domain.diff | 1.97 KB | mavimo | |
Comments
Comment #2
mavimo CreditAttribution: mavimo commentedrepatched
Comment #3
moshe weitzman CreditAttribution: moshe weitzman commentedlooks good
Comment #4
sunIf $cookie_domain is empty, then we don't want to output that JS setting.
1) The Drupal.settings.PROPERTY checks have to be typeof Drupal.settings.PROPERTY checks.
2) At first sight, I don't understand why the code appends a blank space. If that space is required, then there should be an inline comment, so as to prevent the next developer from removing it.
Powered by Dreditor.
Comment #5
treksler CreditAttribution: treksler commentedwhy do we want this patch? it exacerbates the problem in http://drupal.org/node/229825 by spewing more has_js cookies instead of just one for the '/' path which is bad enough and needs to go away.