Media field button styling in Paragraphs reference field affected by presence/absecnce of other content type fields

Created on 15 August 2023, over 1 year ago
Updated 11 January 2024, over 1 year ago

Problem/Motivation

When the Body field on the default "Basic page" content type is disabled, the Media field buttons in a Paragraph are not styled correctly. The issue occurs in the default Claro admin theme as well as the Seven contrib theme. I suspect this issue would apply to other long text fields and in other content types.

I had found a similar report of this issue over in a Core bug report, https://www.drupal.org/project/drupal/issues/3372594 🐛 Incorrect theming of media library select button in Claro theme when using Paragraphs module Active , but the issue was reported as being specific to Claro which it is not. And since I'm not sure if this is a Core or Paragraphs module issue, I thought I would post here first since I only observe the issue when using the Media field in a Paragraph.

Steps to reproduce

I'm testing in a local DDEV environment with PHP 8.1, and I've confirmed this issue on a fresh install of Drupal 10.1.2 and Paragraphs:

  1. Install Drupal 10.1.2, Drush, Paragraphs, Seven with Composer.
  2. Enable Media Library, Paragraphs, Seven modules.
  3. Create new Paragraph Type (PT), "Featured Image".
  4. To the Featured Image PT, add Media reference field with "Image" as the available media type.
  5. Create new PT, "Featured Video".
  6. To the Featured Video PT, add Text field, "Video URL".
  7. On the Basic page content type, create Paragraph reference field, "Featured Media", and enable Featured Image, Featured Video PTs.
  8. Create new Basic page.
  9. Click Add Featured Image.
  10. Note the "Insert Selected" button has correct styling.
  11. On the Basic page content type form display, disable the Body field.
  12. Create new Basic page.
  13. Click Add Featured Image.
  14. Note the "Insert Selected" button does not have correct styling.
  15. Switch the admin theme to Seven and observe that the issue persists.
🐛 Bug report
Status

Active

Version

1.15

Component

User interface

Created by

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

Comments & Activities

Production build 0.71.5 2024