django-cms / djangocms-alias

Other
8 stars 23 forks source link

`Alias` and `AliasContent` objects should not have `get_absoulte_url` methods #188

Closed fsbraun closed 7 months ago

fsbraun commented 1 year ago

Bug: Edit alias context menu of alias plugin

When no alias content object for the current language exists, the "Edit alias" menu entry redirects to something like admin/cms/placeholder/object/5/edit/3/None.

Code inspection shows that the context menu uses the get_absolute_url method of the Alias object.

Way forward

According to the Django docs, get_absolute_url should calculate the canonical URL of an object. I argue that aliases should not have a canonical URL, since

I propose to

Thanks to @vasekch for pointing this out on slack.