django-cms / djangocms-versioning

General purpose versioning package for Django CMS 4 and above.
Other
34 stars 30 forks source link

Bug: Versioned custom models fail with AttributeError on missing `in_navigation` property #425

Closed fsbraun closed 2 months ago

fsbraun commented 2 months ago

Issue

When registering a custom model for versioning and previewing or editing a version of that custom model, the djangocms_versioning.cms_toolbar raises an AttributeError missing the in_navigation attribute of the custom model.

djangocms-versioning provides its own page toolbar which unlike the original page toolbar of django CMS does also assume that the viewed/edited model is of type PageContent which it is not for custom models. This happens if the custom model is apphooked.

Reference