The title says it all, I can’t get this module to work.

Steps to reproduce

Raw Drupal 9.3.2 installation (PHP 8.0.14, MySQL 5.7.36)
composer require drupal/layout_builder_component_attributes:^2.0
installed module
added image field to ‘basic page’ content type
changed to private file system
created basic page node with body and image fields
checked ‘use layout builder’ for default basic page display
configured layout by deleting ‘Section 1’, then adding section with two columns and 33%/67% column widths
added ‘body’ to first column and ‘image’ to second column
created basic page content ‘test’ with text in body and small (300 x 300 px) image in image field
went to ‘Manage layout’ for default view mode
clicked on ‘Manage attributes’ for first block, entered changes, then clicked on ‘Update’
NOTHING HAPPENED (occasionally the java circular wheel would appear for a second)
Same thing happened with the other block
I also tried with different column layouts, but it was no different.

Comments

Grabby created an issue. See original summary.

vselivanov’s picture

StatusFileSize
new667 bytes

Have similar error with Drupal 9.3.4 and 2.0.0 version.
I reproduced it with invalid inline CSS entered to the Style textfield. With class and ID it works good.

Looks like the module doesn't show validation errors with Ajax submit.
I don't have time to fix the bug itself, but for now I added a patch to show these errors in logger.

chris burge’s picture

Title: Clicking ‘Update’ button has no effect » Validation Errors are Not Displayed in Settings Tray
Version: 2.0.0 » 2.x-dev
Related issues: +#2897377: $form['#attributes']['data-drupal-selector'] is set to a random value so can't be used for its intended purpose
chris burge’s picture

Status: Active » Needs review
Issue tags: +Needs tests
StatusFileSize
new613 bytes

Patch attached. Need to update tests to check for error message instead of simply the settings tray being open.

Status: Needs review » Needs work
chris burge’s picture

Status: Needs work » Needs review
StatusFileSize
new6.8 KB

Updated patch.

  • Chris Burge committed a83adc8 on 2.x
    Issue #3257311 by Chris Burge, vselivanov, Grabby: Validation Errors are...
chris burge’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.