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

Can't set a lightswitch field value to false in entry sub-fields #1570

Open
daltonrooney opened this issue Jan 8, 2025 · 0 comments
Open
Labels

Comments

@daltonrooney
Copy link

daltonrooney commented Jan 8, 2025

Description

I have an entry type that contains a lightswitch field with a default value of true. I'm trying to import a CSV which does not include this value. The feed config has "Set Empty Values" set to true, and the field value is set to "Use default value" with the lightswitch disabled. When the new entry is created, the lightswitch field is enabled.

I tried adding a column to the CSV with a value of 0 and mapping the field to that instead, but the newly created entry also has the lightswitch enabled.

In the log, the field is not included in the list of fields that were included when the entry was created, so I assume this is the default value for the entry type.

It may be relevant to note that the entry being created is an inner element on an Entry field, so these are sub-field mappings, not mappings on the main element that is being created.

Update it does seem relevant that the entry being created is an inner element, as this problem doesn't occur if I import the sub-field entries first in their own feed.

Image Image Image Image

Additional info

  • Craft version: 5.5.9
  • PHP version: 8.2.22
  • Database driver & version: MySQL 8.0.36
  • Plugins & versions: Feed Me 6.6.1
@daltonrooney daltonrooney changed the title Can't set a lightswitch field value to false if the default value is true Can't set a lightswitch field value to false in entry sub-fields Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant