I've upgraded to 1.15.4 (ran migration, enabled queryDraft_2_0)
After the upgrade, it seems that Publish Changes is clearing two of my relationship fields ('tags' and 'products') when the editor refreshes. The content is properly published, but these fields are cleared on admin update. If I refresh the admin, the fields are correctly populated. If I edit the document more, and try to publish while these fields are cleared I get the error "field has the following invalid selections: [object Object]: 0"
I've rolled back to 1.15.3 and the problem is resolved - this appears to be related to the changes made here:
https://github.com/payloadcms/payload/commit/5096c378743f4c5eb5f4f2f7e67e5e206cc9da40I have the same problem only with hasMany relations after saving more than once without leaving the page. Noticed first in 1.6.9 and the problem still happens in 1.15.2/3/4 with new db.
it looks like the update in 1.15.4 doesn't account for arrays when setting the values of the relationship - I don't know enough to open a PR to fix it ...
it's known already
Yep I can fix, thank you all for reporting!
Definitely by EOD Monday, possibly before bc it saddens me
PR to fix this has been opened:
https://github.com/payloadcms/payload/pull/3300@jarrod_not_jared thanks - ETA for when this will make it into a release?
@zoul0813 Just released!
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.