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

[5.x] Fix default values not working after saving an entry #11356

Open
wants to merge 3 commits into
base: 5.x
Choose a base branch
from

Conversation

duncanmcclean
Copy link
Member

This pull request fixes an issue where default values weren't working after saving entries & terms.

When entries and terms are saved, empty values are filtered out before they get saved to the Markdown file (see Entry::fileData()). However, that doesn't affect the data on the current Entry/Term instance, the empty values remain.

This PR addresses that by filtering out empty values when extracting publish form values for the response.

It also updates the publish form's meta, to address an issue where fieldtype meta would be out-of-date (in the case of the Grid fieldtype, the default values are for the old row IDs, not the new ones).

Fixes #11355.

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

Successfully merging this pull request may close these issues.

Default values not working after saving
1 participant