Problem/Motivation

I am using Gin admin theme.

I fill out the form then I click the save button, nothing happens.

In my logs I see:
An invalid form control with name='position' is not focusable. <select data-drupal-selector=​"edit-position" id=​"edit-position" name=​"position" class=​"form-select required form-element form-element--type-select" required=​"required" aria-required=​"true" data-drupal-states=​"{"invisible":​{":​input[name=\u0022widget_look\u0022]​":​[{"value":​"float"}​,{"value":​"dropdown_with_flags"}​]​}​}​">​<option value selected=​"selected">​- Select -​</option>​ slot <option value=​"inline">​Inline​</option>​ slot <option value=​"bottom-left">​Bottom left​</option>​ slot <option value=​"bottom-right">​Bottom right​</option>​ slot <option value=​"top-left">​Top left​</option>​ slot <option value=​"top-right">​Top right​</option>​ slot </select>​

Gtranslate js error on save

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork gtranslate-3342683

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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

SocialNicheGuru created an issue. See original summary.

SocialNicheGuru’s picture

Issue summary: View changes
utcwebdev’s picture

This problem also occurs in D9.5 Thunder with the Seven Admin (enhanced) theme. Many of the optional settings are hidden by default, but required, so they often prevent saving the settings form.

For example, if a user were to choose the regular Dropdown that does not include settings for flag icon, size and display options, and attempt to save, the settings cannot be saved. The user must cycle between settings for all of the different display options and set all of the options for all of the hidden required settings groups before settings can be saved.

Perhaps it would be helpful to provide a full basic configuration with database update hook so an upgrade does not break a site with existing settings. Our implementation of the module in 1.5 version uses Context to insert the widget only on specific pages or page groups.

edo888’s picture

Hi,

Try to reinstall, I believe the default values are not imported during update from older versions.

Thanks!

SocialNicheGuru’s picture

that was totally it.

so the update from older versions doesn't quite work.

Uninstalling and reinstalling does.

SocialNicheGuru’s picture

Not quite sure if this needs an update hook or just an explanation on the module page and Readme.

halth’s picture

Hi everyone! 👋

In my opinion it absolutely needs an update hook for those updating the module. Besides the frustration of facing a WSOD after updating the module, it's bad user experience, which doesn't make justice for such a great module with over 10k users!

It does deserve a seamless upgrade path to its D10 compatible version.

I'll try to work on providing an update hook today.

I'll keep the thread posted.

halth’s picture

Title: Cannot save config settings because of JS error in Gin » Cannot save settings form after upgrading to 3.x
Status: Active » Needs review
FileSize
662 bytes

Attaching a patch with a temporary, minimal "fix" that will import the default configuration from config/install in a hook update (Also created a MR for it).

Ideally, we would have a more sophisticated process of copying over the previous configuration entries over to their new names, whenever there's a 1-to-1 match.

Unfortunately I don't have the time to work on that now.

rcodina’s picture

Status: Needs review » Needs work

Importing the default config is wrong, the old config must be migrated. This is what it's already done in #3375925: Errors after upgrading to 3.0.1 from 1.14 or 1.15. At least, some checking should be added to make sure there is no old configuration to migrate before setting the default configuration. Moreover, the hook_update number should begin with 10301.