timkelty / craftcms-site-sync

Sync content to locales on element save.
MIT License
40 stars 9 forks source link

Respect plugin’s default “overwrite” settings when saving via HUD / other craft elements (e.g. Categories) #13

Closed johndwells closed 6 years ago

timkelty commented 6 years ago

Awesome! Will review this ASAP and get it merged.

timkelty commented 6 years ago

Took me a while to figure out what was going on, but I actually don't think this fix is necessary.

What was missing was this: https://github.com/timkelty/craft-localesync/commit/27fc97dc3f1735041c499bd0f4650b3af9d412eb

Silly as it seems, getLocales returns differently structured arrays depending on the elementType.

I'll release a new version with that fix and your category addition and see if it works for you. My tests look good.

timkelty commented 6 years ago

Ok - try 1.4.1.

My tests are working with categories, including the overwrite setting default in HUD