We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have an Entry::EVENT_BEFORE_SAVE event in which I do:
$entry->setFieldValues([ 'latitude' => $coords['lat'], 'longitude' => $coords['lng'], ]);
This works when updating entries, but not for the case where $entry->firstSave is true.
$entry->firstSave
true
It should work on first save.
The first time saving it doesn't work, on updating it does.
5.2.6
8.3
No response
PostgreSQL 16
The text was updated successfully, but these errors were encountered:
Entry::EVENT_BEFORE_SAVE
$firstSave
Craft 5.2.9 is out with a fix for this. Thanks for reporting!
Sorry, something went wrong.
i-just
No branches or pull requests
What happened?
Description
I have an Entry::EVENT_BEFORE_SAVE event in which I do:
This works when updating entries, but not for the case where
$entry->firstSave
istrue
.Steps to reproduce
Expected behavior
It should work on first save.
Actual behavior
The first time saving it doesn't work, on updating it does.
Craft CMS version
5.2.6
PHP version
8.3
Operating system and version
No response
Database type and version
PostgreSQL 16
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: