Automattic / Automattic/jetpack

Cookie Consent Block won't hide / Incompatible with cookie-unaware caching

Open
#36,814 3 comments 0 reactions 0 assignees View on GitHub
[Block] Cookie Consent [Plugin] Jetpack [Pri] Normal [Status] In Progress [Status] Priority Review Triggered Bug Triaged
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

### Impacted plugin

Jetpack

### Quick summary

The Cookie Consent Block doesn't stay hidden when the website uses a non-cookie-aware caching system; or where it is aware of cookies, but doesn't differentiate upon the `eucookielaw` cookie used by the block.

This is because the block only hides itself **server side**. If a cached page is served to a browser, which includes the Block html, the prompt will be shown again.

The block should check for the cookie **client side** and auto-hide the block at display time.

### Steps to reproduce

1. Install WordPress & Jetpack on a server with `eucookielaw` cookie-unaware caching.
2. Dismiss popup
3. Reload and view popup again

https://github.com/Automattic/jetpack/assets/767313/58284bb1-39e8-46c0-92bb-e290e5d414b4

### A clear and concise description of what you expected to happen.

_No response_

### What actually happened

_No response_

### Impact

Some (< 50%)

### Available workarounds?

No and the platform is unusable

### Platform (Simple and/or Atomic)

_No response_

### Logs or notes

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by locating the Jetpack Cookie Consent Block implementation and its handling of the eucookielaw cookie. Reproduce the reload behavior with cookie-unaware caching, then verify that a dismissed prompt remains hidden when the cached page includes the block HTML.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.