Open FlorianLudwig opened 10 months ago
Hey @FlorianLudwig thank you for the report.
I just tried this without localize and got the same problem. I had to tweak dumpdata
to include -e wagtailsearch.indexentry
and got the same error. So this is a core issue :/
tl;dr -
when you run manage.py migrate
, the Root page (pk=1) gets created. the dump data also has:
{
"model": "wagtailcore.page",
"pk": 1,
"fields": {
"path": "0001",
"depth": 1,
"numchild": 1,
"translation_key": "9d32c666-2272-41e1-a685-037061176c76",
"locale": 1,
"latest_revision": null,
"live": true,
"has_unpublished_changes": false,
"first_published_at": null,
"last_published_at": null,
"live_revision": null,
"go_live_at": null,
"expire_at": null,
"expired": false,
"locked": false,
"locked_at": null,
"locked_by": null,
"title": "Root",
"draft_title": "Root",
"slug": "root",
"content_type": [
"wagtailcore",
"page"
],
"url_path": "/",
"owner": null,
"seo_title": "",
"show_in_menus": false,
"search_description": "",
"latest_revision_created_at": null,
"alias_of": null
}
},
hence the error
Issue Summary
Having wagtail-localize breaks dump/load data
Steps to Reproduce
wagtail start mysite .
python manage.py createsuperuser
Install wagtail-localize python module and add it to
INSTALLED_APPS
python manage.py runserver
, login and publish subpage below root pageexport:
rm db.sqlite3
python manage.py migrate
python manage.py loaddata data.json
Error:
django.db.utils.IntegrityError: Problem installing fixture 'data.json': Could not load wagtailcore.Page(pk=1): constraint failed
Technical details