Library not loaded

Created on 10 October 2024, about 1 month ago

Problem/Motivation

Only checkbox appears on entity view display and entity form : the library is not loaded by the bootstrap_toogle widget and formater.

Steps to reproduce

  1. Set the boostrap toogle formater and widget on a boolean field. for example for nodes :
  2. /admin/structure/types/manage/page/form-display
  3. /admin/structure/types/manage/page/display
  4. And set the Bootstrap toogle for status field. Save
  5. --> only a checkbox is displayed on entity view page and entity edit page. Not the toogle.

Proposed resolution

This issue was introduced in a recent commit (april 2024) : Widget and formatter broken if view uses AJAX .
src/Plugin/Field/FieldWidget/BootstrapToggle.php : line 363 : Keep the removed line :
$form['#attached']['library'][] = 'bootstrap_toggle/bootstrap_toggle';

Remaining tasks

Providing the path (I will).

User interface changes

not

API changes

not

Data model changes

not

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

🇫🇷France thedut

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

Comments & Activities

Production build 0.71.5 2024