Goldinteractive / craft3-sitecopy

With this plugin you can copy the content of an entry to another site.
MIT License
22 stars 6 forks source link

Sync wipes NEO fields #19

Closed sidneywidmer closed 4 years ago

sidneywidmer commented 4 years ago

Currently the sync just wipes the target entrys field content if it's a neo field. I don't know exactly why yet, but there seems to be something changed in neo or craft how things get saved.

The $entry attached to the event seems to just have an empty array for all neo fields (other fields work just fine).

Can someone confirm this issue? I'm running Craft 3.5.1 and Neo 2.8.2

sidneywidmer commented 4 years ago

PR with a possible fix: https://github.com/Goldinteractive/craft3-sitecopy/pull/20

Refetching the entry from the DB seems to solve the issue.

christianruhstaller commented 4 years ago

We can confirm this. It seems that following commit removed the behavior for saveModifiedBlocksOnly:

https://github.com/spicywebau/craft-neo/commit/ec93b312ec0e38d4921621444128403d985547ae#diff-f9f066bd830d34ac463fd2a0e5f72913

Beforehand the feature was disabled: https://github.com/spicywebau/craft-neo/commit/dda157369f61f394d18a0b5d3a757ee851d734ad

In the settings the option is still available but currently unused. We'll report this to the devs of Neo.

lukasNo1 commented 4 years ago

It works correctly on all use-cases.

I merged it in the new release 0.5.3.