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

Migration required for "ghost" metadata #3141

Closed
RafaPolit opened this issue Aug 31, 2020 · 2 comments · Fixed by #3145
Closed

Migration required for "ghost" metadata #3141

RafaPolit opened this issue Aug 31, 2020 · 2 comments · Fixed by #3145

Comments

@RafaPolit
Copy link
Member

RafaPolit commented Aug 31, 2020

Previously, we did not sanitize the metadata. Upon deleting a property, the metadata value for existing entities would remain as data of the entity.

Now, if you delete a property, entity's metadata gets sanitized and that property is removed (as should be).

Still, we never migrated the metadata to delete those ghost values. The problem is that, for old collections that already have this ghost metadata, if you try to update the template, resaving the entities causes failed validations, because you are sending properties that are no longer supported by the template.

There is a "workaround" which is to recreate the template property, save the template, and now delete it once more. Now, our sanitizing procedure works and deletes the entity's metadata key.

Still, this is very obscure and convoluted, not to mention really undecipherable for a non-tech user.

We need to migrate the entities to be sanitized and free of these ghost values.

@daneryl
Copy link
Collaborator

daneryl commented Sep 3, 2020

@RafaPolit im not able to replicate, i have tried setting a fake metadata to all entities and then saving the template, this results in a successful save.
i still made the migration that fixes "ghost" properties before trying to replicate #3145, but it does not seems a problem right now.

@daneryl
Copy link
Collaborator

daneryl commented Sep 8, 2020

i was not able to reproduce the issue but we know there is this ghost data and the migration fixes this data state, we continue with the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants