"Don't save location..." breaks the module for anonymous

Created on 28 January 2022, almost 3 years ago
Updated 28 November 2024, 24 days ago

Problem/Motivation

If a user selects "Don't save location details of visitors from GDPR countries ", then no session is ever set for anonymous visitors, neither does session cache module work. The problem is here:

  if ($key != 'smart_ip' || ($key == 'smart_ip' && $share_location && !$eu_visitor_dont_save)) {
    if (module_exists('session_cache')) {
      session_cache_set($key, $value);
    }
    else {
      $_SESSION[$key] = $value;
    }
  }

Steps to reproduce

Proposed resolution

Either document this issue, or remove the !$eu_visitor_dont_save in the condition. Just documenting it would have saved me hours.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

🇬🇧United Kingdom John_B London (UK), Worthing (UK), Innsbruck (Tirol)

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • heddn Nicaragua

    Drupal 7 is no longer supported in a month. Closing old issues. If this is still something you want addressed in the current 5.x version of the module, please re-open and provide some next steps.

Production build 0.71.5 2024