Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8.14-RC Make it possible to switch between Media Picker 2 and Media Picker 3 #10308

Closed
konius opened this issue May 21, 2021 · 1 comment · Fixed by #10334 or #10529
Closed

8.14-RC Make it possible to switch between Media Picker 2 and Media Picker 3 #10308

konius opened this issue May 21, 2021 · 1 comment · Fixed by #10334 or #10529
Labels
status/idea The ideas in this issue are great idea, we're not ready to work on it in the near future. type/feature

Comments

@konius
Copy link

konius commented May 21, 2021

Which Umbraco version are you using?

8.14.0-rc

Bug summary

Switching Media Picker 2 to Media Picker 3 looses the current image selection due to data schema differences.

Screenshot 2021-05-21 153450

Specifics

No response

Steps to reproduce

  1. Create property for Media Picker 2 and pick media items (can be skipped if upgrading)
  2. Change property data type to Media Picker 3
  3. Navigate back to node with property
  4. Selection is gone

Expected result / actual result

I was expecting the currently stored data (comma separated UDI's) to be transformed to the new array of objects with keys.

@nul800sebastiaan
Copy link
Member

Thanks @konius, unfortunately, like with many other datatypes, we don't support switching between datatypes that need to have a different schema stored.
Specifically, we don't want to make this a migration either since we don't know the size of the sites we'll be dealing with and how much data is stored in it. So for performance reasons we don't want to do this automatically when upgrading. For now, you would be able to write a migration yourself to find all existing nodes with stored data and convert them to the new format, after which you can switch the data type on the related doctypes.

The other thing I can think of is doing a conversion when each media picker is loaded in Umbraco, the datatype would take the invalid format, update it and show you the picked items, then you can progressively save the new data. This comes with the handicap that you will need to test for this in your razor templates, so you would have to implement two code paths in your template.

In any case, we don't plan to work on this for the initial release at the moment, so for now that would have to be a custom converter.

@nul800sebastiaan nul800sebastiaan added status/idea The ideas in this issue are great idea, we're not ready to work on it in the near future. type/feature and removed type/bug labels May 25, 2021
@nul800sebastiaan nul800sebastiaan changed the title 8.14-RC Switching Media Picker 2 and Media Picker 3 looses data 8.14-RC Make it possible to switch between Media Picker 2 and Media Picker 3 May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/idea The ideas in this issue are great idea, we're not ready to work on it in the near future. type/feature
Projects
None yet
2 participants