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
Bug: tries to find Metadata after remove a component #19535
Comments
Happened same too. Using same version, except node v18 and Sqlite, strapi 4.20.5. Initiated new project just few days ago. Opening DB i can see that misspelled component metadata is in DB so something fails on migrations. |
I got the same problem too. After removing the component, I can't modify the content. As I see, although the component was removed, this name still in content, when we get content, it's try to query name of component and can not find component and raises error. temp solution:
|
The component is 'missing' from the entity and throws internal server error if we try to save the entity |
I just ran into this issue. Let's say I have two components, Reproduction steps:
This fails because in background, Strapi is saving the relationship between the instance of I was able to resolve the issue by manually accessing the Postgres database and running the following:
This only worked because I have direct access to the database, but it is entirely conceivable that I might be in an architecture where I do not have direct access, (e.g. some cloud based db provider). In that case, I don't know what I would do. Preferably, the process of deleting a component is adjusted to clean up the join table associating such components. |
This is a big problem when working with git branches because as soon as you checkout a branch where your component does not exists, if you haven't removed it before your checkout, your content is doomed. You can't remove it, you can't fetch it, it is stuck. |
I made fix #20167, it seems to work |
This bug is still there and it broke my whole cms. I am not able to receive any data for my API anymore. Why is there no possibility to rebuild the database schamas for all components? Even when I add a new component, there is no possibility for me to pull the changes since strapi wont recognize the new components as long as you dont copy your local databse... With all the created content being replaced of course. Is this normal? |
@designtology try to check your db and remove invalid values, while we wait fix |
Bug report
Required System information
Describe the bug
I removed a component, because I misspelled a letter. I was still using it inside a collection in Content Manager. Obviously, after delete it, disappeared. But now, I can't modify the entry of the collection, it says:
Error: Metadata for "sections.mycomponent" not found
Additional context
The obvious solutions has been create the misspelled component again, then delete the stucked entry, and then remove the component again.
The text was updated successfully, but these errors were encountered: