Open TylerFisher opened 2 years ago
Repro steps: 1) Go to https://[your org]/tinycms 2) In the Google Doc sidebar, unpublish the article 3) Observe the homepage
Expected Result: The article should be unpublished, but the homepage should render
Actual Result: The entire homepage shows a 404 error
Workaround for this issue can be found here. This doesn't happen often, usually during onboarding for new orgs when they're trying out article publishing.
Currently, if a user uses the sidebar to unpublish an article, and that article is featured on the homepage, the homepage breaks because it's trying to access an article that doesn't exist anymore. We should not allow unpublishing of featured articles at all.
When the unpublish API code runs, we should check for the currently featured articles and ensure we're not unpublishing a featured article before moving forward.