Problem/Motivation

When working with Gin and gin_lb, I see the following error when trying to configure a block in layout builder: `Error: Call to a member function removeClass() on array in claro_preprocess_field_multiple_value_form() (line 1025 of /var/www/docroot/core/themes/claro/claro.theme).` This is caused by setting '#attributes' to an array rather that an object of type \Drupal\Core\Template\Attribute in gin_lb_preprocess_field_multiple_value_form.

Issue fork gin_lb-3387157

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

bkildow created an issue. See original summary.

bkildow’s picture

StatusFileSize
new719 bytes

Patch attached

grimreaper’s picture

Version: 1.0.0-rc4 » 1.0.x-dev
Assigned: Unassigned » grimreaper
grimreaper’s picture

Assigned: grimreaper » Unassigned
Status: Active » Postponed (maintainer needs more info)

Hi,

Thanks for the issue and the patch.

Could you please provide more details on how to reproduce the bug?

I have created a block content type with a multivalued (cardinality unlimited) raw text field. Then creating a block content of this type from layout builder and I had no error.

I also put some breakpoints in claro_preprocess_field_multiple_value_form and they were not triggered.

ltrain’s picture

StatusFileSize
new719 bytes

I'm having the same issue. You can reproduce it by adding a block type that references a paragraph that includes a sub-paragraph (multivalue).

I rerolled the patch.

grimreaper’s picture

Assigned: Unassigned » grimreaper
Status: Postponed (maintainer needs more info) » Needs review

grimreaper’s picture

Assigned: grimreaper » Unassigned
Status: Needs review » Postponed (maintainer needs more info)

Hi,

Thanks @ltrain, but even with those steps, I can't reproduce the issue.

claro_preprocess_field_multiple_value_form is not triggered.

Could you specify Core, Gin and Gin LB versions please?

nuevaron@gmail.com’s picture

StatusFileSize
new668 bytes

This still exists on 3.0.0 on D10.

mykola dolynskyi’s picture

StatusFileSize
new313.98 KB

I do confirm bug still exists on v.3 and that Patch #9 helps

Thanks @nuevaron@gmail.com

not ok

christian.wiedemann made their first commit to this issue’s fork.

christian.wiedemann’s picture

I merged it the 3.x branch. Thanks

christian.wiedemann’s picture

Version: 1.0.x-dev » 3.0.x-dev
Status: Postponed (maintainer needs more info) » Fixed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

mykola dolynskyi’s picture

thanks @Christian.wiedemann and others

Status: Fixed » Closed (fixed)

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