Closed (fixed)
Project:
Experience Builder
Version:
0.x-dev
Component:
Theme builder
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Jun 2025 at 13:22 UTC
Updated:
20 Jun 2025 at 15:39 UTC
Jump to comment: Most recent



Comments
Comment #2
attilatilman commentedComment #3
attilatilman commentedComment #4
wim leersI would swear this was fixed weeks ago 😬
Which commit or tag of XB was this tested on?
Comment #5
hooroomooIt was changed back here: https://www.drupal.org/project/experience_builder/issues/3521819#comment... in order to resolve that bug's issue.
But the change itself is a band-aid solution that solved the above issue, but causes the 422 error here. We will want to update the band-aid solution to a proper one but it will require work. @tedbow actually started on a proof of concept solution to address this: #3524274: Component list for UI Library should return auto-saved code components if any
I think in order to address this there's 2 options:
My opinion is doing #2 because it seems like most people have been adding components using the top right button in the code editor anyway.
Comment #6
lauriiiMakes sense to remove the button while it's broken. 👍
Comment #8
hooroomooOpened an MR to remove the "Add to components" menu item from the contextual menu for now. Added a todo that points to #3524274: Component list for UI Library should return auto-saved code components if any which will replace the band-aid solution with a proper one.
The reason behind this bug is because in the "add to components" PATCH request, we are currently sending "...selectedComponent" along with
status: true. Ideally the frontend should only have to send the necessary changes, in this casestatus: true. See #3508140: PATCH request for config entities reset values that are not sent.The band-aid is that we send "...selectedComponent" in the PATCH. Without sending that as of now, I think the hovered preview, and props and slots breaks which is a serious bug. I think this is because the component entities displayed in the component UI list ignores auto-saved JS components.
The contextual menu "Add to components" sends the JS component config entity (...selectedComponent) since thats what we use to render the list of code components. The JS component config entity doesn't include
imported_js_components(by backend design) and so the server complains because it requiresimported_js_componentsto be sent when its also sentcompiled_jsThe bug doesn't happen from clicking the top right "Add to components" button because
...selectedComponentin this case is taken from our redux store of the code editor which stores theimported_js_componentsproperty that the error is about.Comment #9
hooroomooComment #10
balintbrewsI also think removing it for now is the good call. Approved the MR, assigning back to @hooroomoo to resolve the conflicts, then this can be merged.
Comment #11
balintbrewsComment #13
hooroomooIt will be addressed properly in #3524274: Component list for UI Library should return auto-saved code components if any