nystudio107/craft-code-field

Available Languages (Select "All") - Saving removes all selected languages

Closed this issue · 1 comments

Describe the bug

I added the code field to our content matrix (Type: Matrix) and every time I try and save the field with all code languages selected the field disregards all selected and saves the matrix field with none selected.

If I only add a few the field saves correctly and shows the dropdown to change the languages.

To reproduce

Steps to reproduce the behaviour:

  1. Add the codeField in a Matrix
  2. Under "Available Languages" select "All"
  3. Save the matrix field
  4. Navigate to one of your entries and add the code field
  5. There should be no drop down available
  6. Navigate back to the settings and edit the matrix field
  7. Under "Available Languages" everything is deselected.

Expected behaviour

Selecting "All" should save correctly and show all the languages.

Screenshots

code_field_no_dropdown

dropdown_none_selected

code_field_with_dropdown

Versions

  • Plugin version: 4.0.9
  • Craft version: 4.4.14

Addressed in d6a3104 & 59a2a26

Craft CMS 3:

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-code-field": "dev-develop as 3.0.10”,

Then do a composer clear-cache && composer update

…..

Craft CMS 4:

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-code-field": "dev-develop-v4 as 4.0.10”,

Then do a composer clear-cache && composer update