-
Notifications
You must be signed in to change notification settings - Fork 300
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
Disable certain attribute fields when editing #1691
base: 1.x
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
this might not solve the issue of changed attribute type. probably should add a checker/validate in
if adding a new method to FieldTypes, maybe we can have a sort of transformer to handle a basic conversion like "text field value" -> ['en' => "text field value"] and vice versa |
This is very true. @alecritson I think we need to consider this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments made.
@wychoong I've pushed up a couple of tweaks based on what I think you mean. As for changing the format of the data from one to the other I think that's out the scope of what this will be trying to do. We have spoke about it in the past and I think migrating data based on whether a fieldtype changes should be it's own unit of work with it's own considerations. 🤔 |
Yup, looks good. Maybe handling for Text and Translated can be included, seems common enough scenario |
The hub doesn't really support the changing of certain attribute columns once hey have been created. This is because it's hard to keep the
attribute_data
in sync with what the new fieldtype might require, leading to quite an overhead for something seemingly simple.This PR will disable the
handle
andtype
columns when editing an attribute to preserve and prevent data issues. If a developer needs to change the fieldtype then it should be done in a migration or similar so that appropriate steps can be taken to ensure the data is migrated properly.As a side effect this should close #1655