Warning - Theme hook focal_point_media_library_image_widget not found.

Created on 17 October 2019, about 5 years ago
Updated 25 August 2024, 3 months ago

Problem/Motivation

The focal_point_media_library_image_widget function do not exists, even though it is set as callback function for the media library forms. A warning is thrown in the logs.

Steps to reproduce:

  • Install a vanilla Drupal, with the focal point module
  • Enable focal point, media, media_library
  • Add a media field to a content type, allow the image media type to be referenced
  • Set the image media type field widget to "Image (Focal point)" on the media library form mode
  • Create a node, upload a new media
  • Check the log, there's the warning

Proposed resolution

Adds the focal_point_media_library_image_widget function, but I'm not sure what should be its purpose?

Remaining tasks

Write patch

๐Ÿ› Bug report
Status

Postponed: needs info

Version

2.0

Component

Media Integration

Created by

๐Ÿ‡ซ๐Ÿ‡ทFrance nanak Sarlat-la-Canรฉda

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡ฏ๐Ÿ‡ดJordan abu-zakham

    After reviewing the code and the comments, it appears that the code was added to override the default Image Widget template when using the Media Library. However, I have found that removing this override has resolved the issue, and now everything is functioning as expected. It seems that at some point, the theme "focal_point_media_library_image_widget" was removed, but the corresponding code was not removed along with it. To address this, I will create a pull request to remove the unnecessary code.

  • @abu-zakham opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ง๐Ÿ‡ดBolivia vacho Cochabamba
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.2.x + Environment: PHP 8.2 & MySQL 8
    last update 8 months ago
    158 pass
  • ๐Ÿ‡ง๐Ÿ‡ดBolivia vacho Cochabamba

    This patch is for 2.x branch

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia aman1248

    Hi @Rajeshreeputra, we've tested patch #6, and it appears to be resolving the error as required.

  • Status changed to Postponed: needs info 3 months ago
  • ๐Ÿ‡ซ๐Ÿ‡ฎFinland sokru

    I was not able to reproduce this issue on latest version (2.1.1) with Drupal 11 and Claro admin theme.
    The patches here are basically a revert for #3001262: Integrate focal point with media_library, which is now in core โ†’ . On that issue people are complaining that the feature does not work.
    Also if I add some debug messages on templates/focal-point-media-library-image-widget.html.twig file it does not appear anywhere, so gives an confirmation that template file is obsolete.

Production build 0.71.5 2024