- Issue created by @jan kellermann
- Merge request !10208#3487874: Only use localStorage after user interaction. โ (Closed) created by jan kellermann
- ๐บ๐ธUnited States smustgrave
Thanks for reporting, we could use a test case showing this as a problem.
- ๐ฉ๐ชGermany jan kellermann
Thank for your comment. I added the test.
Please review.
- ๐ง๐ฌBulgaria valthebald Sofia
As far as stickyHeaderState is entirely client-processed and is not collected/processed by the server (who should it be?), I'd argue it's not a subject to GDPR or similar regulations.
GDPR, as it states in the very first article, is about...rules relating to the protection of natural persons with regard to the processing of personal data and rules relating to the free movement of personal data.
since there is no processing of personal data, I'd say there is no need to get user consent
- ๐ฌ๐งUnited Kingdom longwave UK
+1 to #9. GDPR is only relevant to the processing of personal data, this is kept entirely client side and cannot be used to track or identify a user so I believe this usage of localStorage is exempt.
- ๐ฉ๐ชGermany jan kellermann
@valthebald and @longwave are right, that this is not a violation of the GDPR - but of the EU ePrivacy Directive and national laws in european countries (since 2002!).
The ePrivacy Directive Art. 5 (3) says, that you need usersโ consent before you "store information" (cookies, localStorage etc.) "in the terminal equipment of a subscriber or user" (e.g. browser) except "strictly necessary" data. This EU directive is not a direct law, but is implemented by national laws, in Germany the TDDDG and in Spain the LSSI for example.
The new EU e-Privacy Regulation is currently being drafted; this will replace the directive and will then become direct law (in the same way as the GDPR). According to the current status, it contains an analogous passage, see Article 8 "Protection of information stored in and related to end-usersโ terminal equipment":
It is not about which data is processed, but about the protection of the visitor's end device - so it does not matter whether it is a tracking, 1st or 3rd party cookie.
It is a violation in all european countries.
- ๐ง๐ฌBulgaria valthebald Sofia
@jan kellermann I'm equally amazed by your knowledge of the EU laws as I am disappointed by implied restrictions to deliver meaningful functionality to our clients...
- ๐ฉ๐ชGermany jan kellermann
@valthebald My MR does not cause any disadvantages for the users: LocalStorage is only used when it is needed. This is a responsible approach in terms of the law. For example, the theme writes the entry in the LocalStorage for mobile users who never get to see the menu switch - you can't talk about โtechnically necessaryโ here.
- ๐ฌ๐งUnited Kingdom longwave UK
Should we just change
setStickyHeaderStorage()
to delete the localStorage entry if the passed value is false? - ๐ฉ๐ชGermany jan kellermann
Great idea, @longwave!
Since there's no reason to save the wrong state, I'll remove it now.
I added this to javascript and also to the test.
- ๐ฉ๐ชGermany jurgenhaas Gottmadingen
Works as expected. Maybe this needs a Drupal CMS Release tag, I will ping @pameeela about it.
- ๐ฆ๐บAustralia pameeela
Would be great to get this into our initial release if possible.
- ๐ง๐ทBrazil filipeabreu Campinas/SP
I added diff file https://git.drupalcode.org/project/drupal/-/merge_requests/10208.diff of MR https://git.drupalcode.org/project/drupal/-/merge_requests/10208 as a patch and it could be applied properly. Also, the expected result worked fine.
Patch:
Before:
After:
My local setup settings:
- Drupal 11.1.0
- Web Server: nginx/1.26.1
- PHP: 8.3.10
- Database: MariaDB 10.11.8
-
longwave โ
committed 7ba9c195 on 11.1.x
Issue #3487874 by jan kellermann, filipeabreu, valthebald, longwave:...
-
longwave โ
committed 7ba9c195 on 11.1.x
-
longwave โ
committed 5e89fa50 on 11.x
Issue #3487874 by jan kellermann, filipeabreu, valthebald, longwave:...
-
longwave โ
committed 5e89fa50 on 11.x
- ๐ฌ๐งUnited Kingdom longwave UK
Committed and pushed 5e89fa50893 to 11.x and 7ba9c1951c7 to 11.1.x. Thanks!