Permalinks gaan kapot als de categorie van een verwijderd onderwerp later wordt verwijderd

AI-generated summary

JackALaing reports an issue where permalinks break if a deleted topic’s category is later deleted. After deleting topics and their category (with redirects set up), the topics remain in a category-less state in the database, causing redirects to fail. Non-admins see a “page doesn’t exist” error, while admins can view the topic without a category. The issue appears to affect only admin-authored topics. The workaround is to undelete each topic, move it to an archive category, and delete it again, which restores the redirects.

From a cursory search, it looks like no-one else has been discussing this issue. Bug might be an unfair label because it also looks like I’m probably not using the permalink feature as it was intended. But nevertheless I thought I’d be a good open-source citizen and report this behavior.

Context: We used to have some documentation in our forum, which we decided to migrate to GitBook. To ensure that community members are pointed to the latest source of truth, I opted to delete the old wiki posts and use the permalinks feature to redirect to the appropriate place on our new docs site.

After setting up the permalinks, I deleted the topics, then deleted the categories. Note: I also set up redirects for the categories, which worked fine.

It seems that deleted topics whose categories are later deleted (and also redirected) exist somewhere in the database in a category-less state and that this breaks the topic’s redirect. If you’re not an admin, you get the standard “Oops! That page doesn’t exist” forum page, if you are an admin you can see the topic sans category. It’s also worth noting that all the deleted topics were all authored by admins, which probably influences the behavior.

The fix for this was to undelete each topic, move it into our Archive category, then delete again. Once I did this the redirects worked immediately.

1 like