django-cms / djangocms-history

Provides undo/redo functionality for django CMS operations
https://www.django-cms.org
Other
28 stars 13 forks source link

Error on CMS site that doesn't use language url prefix #7

Closed russmo closed 7 years ago

russmo commented 7 years ago

Summary

IntegrityError: null value in column "language" violates not-null constraint raised on a django-cms site that doesn't use i18n_patterns() in urls.py or that uses i18n_patterns(urls*, prefix_default_language=False) [new parameter in Django 1.10] so that language code is not prepdended to urls. Happens on plugin creation, change, or move. If i18n_patterns is used, djangocms-history works as expected, but urls get language-prefixed. This causes a problem for my site because I don't run multiple languages and want my "About" page to be http://my.site.com/about, not http://my.site.com/us-en/about.

Expected behaviour

Plugin editing happens normally.

Actual behaviour

Integrity error due to null language raised on every plugin action.

Environment

czpython commented 7 years ago

Thanks for reporting. I'll try to get a fix out by tomorrow.

czpython commented 7 years ago

Hello @russmo, I've pushed 0.2.2, please let me know if you run into any other issues. Thanks!