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
Creating and deleting models can lead to a broken tree in the database #4759
Comments
The requirement to reproduce the issue on a fresh Wagtail project isn't about severity, it's about our ability to fix it. If you can't reproduce it, it's very hard for us to help. |
By no, I meant I have not tried it yet, because I just havent had the time. I could just write the issue report in a month or so, but by than I would have forgotten de details. |
I encountered the exact same error. I thinks this is also what caused the error I wonder if the bug is caused by code in wagtail or in treebeard. |
@Paulmolin FYI, running |
@gasman Thank you for the tip, I will try this! I just found out that there was a
I keep investigating this problem. |
As there is a documented solution to this and no further feedback on this issue being a problem I will close this. Feel free to comment if anyone thinks we should re-open. |
Issue Summary
On my development server I see my site has records which don't match up. It first occured after deleting a number of pages in Wagtail, thus it is likely a bug within Wagtail.
Looking at the table "wagtailcore_page" , the table does NOT match what is shown in wagtail.
In the attachment, notice that "digitale rechten" is a child of "achtergrond & verdieping", yet numchild indicates 0, where it should be 1. The path does confirm this page is a child of "achtergrond & verdieping" There might be more errors in other tables.
Steps to Reproduce
Leading up to all this, I was working on the models. Initially a model "Article" was allowed as subpage_type of "PublicationIndex" ("achtergrond & verdieping" is a publication index). I modified the models by adding two new page models in between. Now the subpage_type for PublicaitonIndex would allow for a type "Theme". The subpage_type for "Theme" would allow a type "Subject", and "Subject" would accept a supage_type "Article". I then ran makemigrations, followed by migrate, which ran succesfully. Now I wanted to get rid of the leftover Articles which were still a direct child of "PublicationIndex".
ValidationError at /cms/pages/add/ffs_article/theme/5/{'path': ['Page with this Path already exists.']}
Besides that, the earlier added page "DigitaleRechten" (of type "Theme") does not show up anywhere in the CMS, while it does show in the database!
No. But this issue should certainly not occur anyway. A currupted datatable is severe.
Technical details
The text was updated successfully, but these errors were encountered: