Problem/Motivation

When the chosen module is enabled, the form at /admin/config/development/configuration/single/export fails to load when a configuration name option is chosen.

This issue did not exist in Drupal 11.2 but only presented with Drupal 11.3.

Drupal 11.3 switched to HTMX for this config export page.

As a workaround I was able to get the config export form working again by adjusting the jQuery selector on the chosen configuration page: select:not([name="config_name"])

Steps to reproduce

1. On Drupal 11.3 enable chosen module with single hierarchical select
2. Go to /admin/config/development/configuration/single/export
3. Export a config (text area will not load)

Proposed resolution

TBD

Remaining tasks

User interface changes

API changes

Data model changes

Comments

pmagunia created an issue. See original summary.

nagy.balint’s picture

Hi!

Is this issue only with single hierarchical select module enabled?

At least I could not reproduce the issue without that module.

joegraduate’s picture

We're seeing this issue using Chosen 4.0.3 and Drupal 11.3. We do not use the single hierarchical select module. We do have Chosen configured to "Always apply" for both single select and multi select.

joegraduate’s picture

Version: 3.0.x-dev » 4.0.x-dev
joegraduate’s picture

For what it's worth, the suggested jQuery selector configuration workaround did not work for me.

I had to use this "starts with" attribute selector to match both of the select inputs in the core Config Export form (config_type and config_name):
select:not([name=^"config_"])

The problem described in #3571919: Comma separated selectors list limits usability limits how much that setting can be used as a workaround somewhat.

joegraduate’s picture

nagy.balint’s picture

At least on Chosen 5.0.x I cannot reproduce the issue with Drupal 11.3.5

If you can, please try to upgrade to the 5.0.x branch with the https://github.com/noli42/chosen/releases/download/3.0.2/chosen-assets-v... library.

veverka42’s picture

I notice a different behavior in the following two projects Drupal 11.3.7:
- a clean project (installed using "composer create drupal/recommended-project")
- a legacy project migrated from D10, with several contrib and custom modules.

In the clean project, the /admin/config/development/configuration/single/export page works correctly.

In the other project, the page above has a weird behavior: choosing a "configuration type" and then a "configuration name" doesn't work at all, and even patching as shown in https://www.drupal.org/project/webform/issues/3585180#comment-16553511 works correctly only once. Any following selection of a "configuration name", without changing "configuration type" shows empty configuration.

Anyway, if the "configuration type" is changed to another value and then set back, the "configuration name" selector works (once again, even if code is patched to avoid parsing of null yaml, it works only once).

Example:

configuration names: A, B, C
configuration types: A1, A2, A3, B1, B2, etc...

choosing A, A1-> ok*
A2 -> empty config
B,A,A2 -> ok*
A1 -> empty config

*: only if code is patched as described in the issue linked above

and so on.

Moreover, if I choose to export the whole configuration, the file is corrupted.

I've seen there have been a lot of changes in ConfigSingleExportForm, I haven't spot the root cause, but I tried to rollback the whole "config" folder under "core/modules" with the latest version from version 11.2.x (11.2.11). In this case the export works correctly.
This looks to be a regression in 11.3.x.

veverka42’s picture

The problem I reported was actually due to Webform Devel module, in which there is an hook which alters the ConfigSingleExportForm.

More details here https://www.drupal.org/project/drupal/issues/3585442#comment-16555761

nagy.balint’s picture

Status: Active » Postponed (maintainer needs more info)

Any way to reproduce this issue on 5.x?

jmagunia’s picture

I can no longer reproduce the issue.