Added field migration for Image, Set and collectionlinkselect#2
Added field migration for Image, Set and collectionlinkselect#2Masara wants to merge 3 commits intoraffaelj:masterfrom
Conversation
|
Thanks. I'm glad, that someone uses the tool. I didn't use cockpit for a while now and I didn't have time to test your changes, yet - just skimmed your code for now.
If I remember correctly, the image field can't be translated directly to asset fields, because it was possible to link images from the file system, that weren't present in the asset list.
I'm not familiar with v2 anymore, needs manual testing...
I set that on purpose to true, because v1 never had a native concept for published/state management. Therefore everything was set to public by default. Because my own concept was to use a boolean field named
Thanks. As I said, it's too long ago, that I looked into this code and I'm not sure, if/when I'll have another look... So no promises, that it gets merged anytime soon. I leave this PR open, so others can see, that changes exist. |
Thank you for providing the tool :)
That could be, in my use case there where no Images used on the fields, so I guess I was lucky, but maybe future users can't really use it like this. This code part could be either removed or commented out for now, since currently Assets fields are the only possible Image field replacement 🤔
Tested it on my side and it worked, but I can't say that I thought of every use case there is...
Ah, I guess I misunderstood your code then and thought it was for doing the opposite...
No worries, I guess that is the best thing to do right now, since probably not many other people will need to use this anymore 👍 Maybe in the future, if other people find their way here, they could also improve and test the changes made here. |
|
I had another look at the image vs asset thingy. If I can trust my own research, the image field wasn't the problem, but the gallery field. See:
So the direct conversion should work. |
I added field migrations for
Furthermore I fixed the part of the code which was supposed to set all migrated contents to "published" and I added the options "Migrate" and "Delete v1 files" to the Migration addon UI for Cockpit v2.