Formatter not showing

Created on 17 October 2023, 9 months ago
Updated 18 October 2023, 9 months ago

'Paragraphs Responsive Background Image' is not showing in the formatter of the media field (so is not selectable).

In the log I see:
Warning: Undefined array key "#view_mode" in paragraphs_responsive_background_image_formatter_preprocess_paragraph() (line 42 of /[path]/modules/contrib/paragraphs_responsive_background_image_formatter/paragraphs_responsive_background_image_formatter.module)

Versions:

  • Drupal 10.1.5
  • PHP 8.1.24
  • Paragraphs 8.x-1.16
  • Slick Paragraphs 8.x-2.4

Is there some config I've missed somewhere?

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom kmv

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

Comments & Activities

  • Issue created by @kmv
  • 🇮🇳India Mohd Sahzad

    I have updated for this Warning: Undefined array key "#view_mode" in paragraphs_responsive_background_image_formatter_preprocess_paragraph() in above attached patch

  • 🇬🇧United Kingdom kmv

    Thanks for the patch, I confirm that it resolves the warning.

    In other news I have realised why I wasn't seeing 'Paragraphs Responsive Background Image' as a formatter - I misunderstood the instruction (on the module's project page): 'Create or modify the media image display settings and choose Paragraphs Responsive Background Image as the formatter'. I thought this was referring to the media image field referenced in the preceding step and that the reference to 'modify the media image display settings' was to to the formatter's options (the gear button).

    I now realise you were actually instructing the reader to create a new Media Type (of type image) and then in the 'Manage display' of that new media type to set the formatter there. You may want to consider enhancing those instructions.

    In any case, thanks for the patch!

Production build 0.69.0 2024