Overview

The component imported from the configuration is not appearing on the XB user interface.

Steps to Reproduce

  • Login to drupal site -> Navigate to /admin/config/development/configuration/full/import
  • Select Single item -> Code Component -> Copy Paste the content of : experience_builder.js_component.card.yml
  • Click on Import -> Import Successful
  • Verify import : At /admin/config/development/configuration/single/export , select Code component , card (Card ) is present
  • Navigate to /xb/xb_page/1/editor card is not present there inside Library

Proposed resolution

User interface changes

Comments

neha_bawankar created an issue. See original summary.

wim leers’s picture

Status: Active » Postponed (maintainer needs more info)

Please attach the contents of this exported component, or at least the status.

wim leers’s picture

Title: Component imported from configuration , is not reflected on XB UI » Code Component that is exposed (`status: true`), imported from configuration, is not available to be instantiated in the XB UI
Component: … to be triaged » Theme builder
Category: Bug report » Support request
Status: Postponed (maintainer needs more info) » Fixed
Issue tags: +Configuration Management

From Slack:

@wim.leers: @Neha Bawankar the exported YML contains status: true, right?
@wim.leers:  (And hence you expect it to appear as a component available to use in the Page Builder?)
@Neha Bawankar Yes , @wim.leers that’s the case

Then this is behavior as expected.

You must export valid subsets of configuration. When exporting a code component (JavaScriptComponent config entity) that has been exposed as a component, then you must also export the corresponding component (Component config entity).

This is similar to how if you'd export a Text Editor config entity and expect to be able to import that on another site and use it, that won't work either, because you'd also need the corresponding Text Format config entity.

wim leers’s picture

⚠️ Tricky: config management and different import mechanisms are confusingly inconsistent: config import UI vs default module config vs recipe config all behave kinda differently. See prior research for #3515646: Add automated <img srcset> generation at https://git.drupalcode.org/project/experience_builder/-/merge_requests/9....

The only viable usability improvements are:

  1. alter how single config imports work — but that'd then also bypass best practices for config management
  2. add validation similar to Editor's RequiredConfigDependencies constraint, but inversed — nope, that can't work, because the code component must be imported before the component, so it'd still be invalid initially

Status: Fixed » Closed (fixed)

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