Do not show consent button on embed preview in CKEditor

Created on 11 September 2024, 2 months ago
Updated 12 September 2024, 2 months ago

Problem/Motivation

When the user enables the "Enforce consent for all embedded content settings", they will see a consent button on the embedded media preview. However, when the Site Manager creates or edits content with embedded media, they also see this consent button, even on the create or edit page, which they shouldn't.

Steps to reproduce

  1. Enable module "social_embed"
  2. Log in as a user with the "Site manager" role
  3. Go to "User Edit" page user/{id}/edit
  4. Enable checkbox "Enforce consent for all embedded content settings"
  5. Create any CT with text long field, for instance, "Topic"
  6. Fill in Embed URL of Vimeo video "https://vimeo.com/1006140147"
  7. You will see the placeholder with the consent button

Proposed resolution

Add route checking in method process of SocialEmbedUrlEmbedFilter to not add placeholder on 'embed.preview' route (it is a route used to apply filter during adding/editing new embed URL)


πŸ’¬ Support request
Status

RTBC

Version

13.0

Component

Code (back-end)

Created by

πŸ‡ΊπŸ‡¦Ukraine r_cheh

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

Comments & Activities

Production build 0.71.5 2024