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

Preparse Saved After Element Save Marks All Fields as Dirty #77

Open
kevinamezaga opened this issue Oct 13, 2021 · 0 comments
Open

Preparse Saved After Element Save Marks All Fields as Dirty #77

kevinamezaga opened this issue Oct 13, 2021 · 0 comments

Comments

@kevinamezaga
Copy link

Was having an issue with the preparser field that threw me for a loop.

I use the Preparse field to generate a number value of a total # of related entries to the entry being saved. By default, this saved after the entry was saved; that would normally be fine, however, I have a plugin that takes that entry, checks if a certain field is dirty, and if the new value is true, then it sends out notifications.

So I finally figured out that it was the Preparse field that, on the second save after the user saves the element, marks all the fields as dirty even though it's just the Preparse field that's dirty. This bypassed all of my plugin's logic. I ended up making the field save before the entry save, but I spent a fair amount of time troubleshooting before I got to this conclusion.

Some recommendations:

  • Set the default action to save before entry save
  • Change the plugin logic to only mark the preparse field as dirty
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

1 participant