django-cms / djangocms-versioning

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

Clicking on "Unlock"-button, sometimes shows page "404 - Not Found" #384

Closed jrief closed 3 months ago

jrief commented 4 months ago

How to reproduce:

After analizing this, it turns out that the link behind the "Unlock"-button points onto the published page. This then results in the 404 - Not Found exception.

Unlocking a page can also be performed in the Versioning Admin List View. Here a list of page versions is rendered, but only the current version with state=DRAFT offers an unlock button. And from here, unlocking works as intended.

By applying this patch, unlocking a page should work as expected. However, I'm unsure if this is the right approach.

fsbraun commented 4 months ago

@jrief Just for clarification: The button should not be shown on the published page, right? Or, do you think the unlock button should unlock the draft version (and not try the published one)? (The latter would require a check if there is a draft version to unlock.)