Problem/Motivation

We had an issue setting cookies to for a Drupal installation in a subfolder ( folder/drupalroot).
This is something that the user can manually change in the config page of the module.
In our case, most of our installations are in a subfolder, and each subfolder has a different name , so we want the subfolder name to be the default value of the cookie path field instead of (/)

Proposed resolution

We need to change the default value of the cookie path field from (/) to base_path()

Remaining tasks

Create a patch ..in progress

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Orabi created an issue. See original summary.

Orabi’s picture

Orabi’s picture

Orabi’s picture

patch #2 uses the base_path() function from drupal. that didnt work since the function language_cookie_set() is called from hook_boot , which means that we will get a fatal error ( base_path() is not defined )

Patch #3 is fixing this by using the global $base_path

Orabi’s picture

Assigned: Orabi » Unassigned
Status: Active » Needs review
PieterDC’s picture

Status: Needs review » Reviewed & tested by the community

Good fix, which adheres to Drupal best practices.

Orabi’s picture

Issue summary: View changes