The wrapper class not getting added for image focal point widget

Created on 4 February 2025, 19 days ago

Problem/Motivation

I used the patch in this issue Support for other field types like Link or Table fields Needs work to add the support for image_focal_point widget. The Translate button appears but nothing happens when clicking on that.
It turned out that for some reason the wrapper doesn't get added for the element, i.e. the following lines of codes don't work properly:

    $element['#prefix'] = '<div class="' . $id . '">';
    $element['#suffix'] = '</div>';

Proposed resolution

The solution in this case was to add this line to make sure the wrapper gets added:

    $element['#wrapper_attributes']['class'][] = $id;

I'll add a patch for that. It seems a very customized solution.

🐛 Bug report
Status

Needs work

Version

2.0

Component

Code

Created by

🇫🇮Finland mitechworld

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

Comments & Activities

Production build 0.71.5 2024