Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project.yaml - Required and Searchable properties not saved correctly #3872

Closed
MichaelCaraccio opened this issue Feb 20, 2019 · 1 comment
Closed

Comments

@MichaelCaraccio
Copy link

MichaelCaraccio commented Feb 20, 2019

Description

The saving process of project.yaml seems to have a different behavior depending on if I save a field or a section.

Steps to reproduce

  1. Admin backend -> Settings -> Section -> I create single section
  2. Save it
  3. Commit it
  4. Re-open the same single section from the backend
  5. Save it (without any changes)
  6. Git diff the project.yaml:
-dateModified: 1550682850
+dateModified: 1550684258
@@ -390,19 +390,19 @@ matrixBlockTypes:
           -
             fields:
               05723f8b-2e1d-403e-89c2-7b44b9127105:
-                required: false
+                required: '0'
                 sortOrder: 4
               1a2963b6-07be-40af-b812-16f7f128ecf1:
-                required: true
+                required: '1'
                 sortOrder: 3
               315534bf-a5e7-4529-99ff-648114451967:
-                required: true
+                required: '1'
                 sortOrder: 1
               af98c2ba-9200-451b-8ecc-50ef9640c96b:
-                required: false
+                required: '0'
                 sortOrder: 5
               e3830164-9377-499b-a5a4-07cc7a98f768:
-                required: true
+                required: '1'
                 sortOrder: 2
             name: Content
             sortOrder: 1
@@ -413,7 +413,7 @@ matrixBlockTypes:
         handle: backgroundColor
         instructions: 'Valeur en hexadécimal'
         name: 'Background color'
-        searchable: true
+        searchable: '1'

...
...

As you can see, boolean searchable and required fields are changing from 0 to false and 1 to true.

Now I continue, same process but with a fields:

  1. Go to admin backend. Settings -> Fields
  2. Open a fields
  3. Save it without any changes
  4. Git diff the project.yaml file:
--- a/config/project.yaml
+++ b/config/project.yaml
@@ -1,4 +1,4 @@
-dateModified: 1550682850
+dateModified: 1550684526

As you can see all the searchable and required propreties changed back to their old values (false or true instead of 0 or 1)

Additional info

  • Craft version: 3.1.12
  • PHP version: 7.1.22
  • Database driver & version: MySQL 5.7.23
  • Plugins & versions:
  • Imager v2.1.4
  • Migration Manager 3.0.17
  • Redactor 2.3.1
  • Super Table 2.1.8
@brandonkelly
Copy link
Member

brandonkelly commented Feb 20, 2019

This is a known “bug” but there’s not much we can do about it for now, besides tell you to use PostgreSQL instead of MySQL if it bugs you. Explanation here: #3695 (comment)

Good news is that it’s harmless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants