Goldinteractive / craft-sitecopy

Other
2 stars 4 forks source link

Matrix fields on target translations become blank when Site Copy is used #5

Closed japo32 closed 1 year ago

japo32 commented 1 year ago

I have plain text fields and then Matrix fields with blocks.

The Block types have Entry fields, Plain Text fields, and Asset fields.

When I site copy to another translation, the blocks are created but they are blank.

I get an error like so, but these fields are filled out on the translation I have currently open:

Screen Shot 2023-08-23 at 2 53 39 PM

Then when you check the translation with the error, the Matrix fields are blank.

This was after upgrading from Craft CMS 4.4.17 to 4.5.0

craft-sitecopy is 1.0.6 all the way.

I did a test by restoring a DB backup, and rolling back to the 4.4.17 codebase and matrix fields were being copied properly as expected.

lukasNo1 commented 1 year ago

Hello, I found the problem and opened an issue with craft for it. https://github.com/craftcms/cms/issues/13592 We'll fix it when the changes in 4.5.0 have been clarified

lukasNo1 commented 1 year ago

hey @japo32, I just created a new release 1.0.7 with a workaround for this problem. Could you test if the plugin now works correctly on 4.5.0?

japo32 commented 1 year ago

Wow so quick @lukasNo1 ! It looks like they've reverted the changes though. https://github.com/craftcms/cms/issues/13592#issuecomment-1690578442

I'll test out with both upgraded CMS and plugin.

japo32 commented 1 year ago

Yeah looks like with that Craft CMS update, the workaround doesn't work.

lukasNo1 commented 1 year ago

Yes, i saw that they reverted it :) The workaround is unnecessary now with craft 4.5.1.

The copy should now work, correct?

japo32 commented 1 year ago

Hi @lukasNo1 , Yep I've confirmed the plugin works as expected in these versions:

Craft CMS: 4.5.1 Site Copy X: 1.0.6

japo32 commented 1 year ago

Just a note @lukasNo1 , it's broken with the latest release 1.0.7. Not sure what's the procedure for rolling back.

lukasNo1 commented 1 year ago

Ok that is weird, as since Craft 4.5.1 the workaround shouldn't do anything. i will make a new release to rollback the changes to be sure

japo32 commented 1 year ago

Thanks @lukasNo1 . Craft 4.5.0 has been a rollercoaster for a few weeks based on the recent releases.