Publishing A Podcast Automatically Publishes All Podcast Episodes For Custom DB Prefix
Describe the bug
When a user upgrades from Beta 16 to Beta 17 or 18 while using a custom database prefix, it sets their Podcast publication status to draft. If the user has any existing published podcast episodes, they become draft episodes and if the user has any future-scheduled episodes, they remain in draft.
However, once a user publishes their Podcast ALL episodes become marked as Published, including those originally scheduled for a future date. The publish date on all episodes becomes set as the publication date of the Podcast itself. Running Housekeeping does not fix this issue.
I imagine this will largely be an issue with upgrading users but, imagine someone sets up a draft Podcast with multiple future-dated episodes and then Publishes the Podcast only to see all the Podcast Episodes get published as well.
I confirmed the Database update script for release 17 worked as intended by attempting to re-run it and getting an error at that time.
This ONLY happened for my instance that had a custom table prefix.
I cannot unpublish and republish Episode 3 for its correct original date, but receive an "Oops something went wrong" page when trying to. I also cannot unpublish and re-publish or delete the Trailer "episode" for the podcast. Clicking unpublish appears to work but the Trailer does not actually unpublish.
I attached my log files so you can see additional details access.log
Steps to reproduce
- Install Beta 16 of Castopod and ensure you use a custom table prefix
- Create a Podcast
- Publish an episode and Schedule a future episode
- Upgrade the instance to Beta 18, including the necessary Database updates modifying the cp_ prefix to the custom one
- Sign in to your instance again
- Click the banner to Publish your podcast and create your publishing post.
- Once published, all podcast episodes, including scheduled episodes are marked as Published.
Expected behavior
- I expect that especially for an upgrade from an earlier beta, the system would see existing podcast episodes and presume the Podcast itself should be set to published.
- I expect that existing episodes will retain their publication dates, future or otherwise.
- I expect that scheduled episodes will remain scheduled instead of published.
Actual behavior
All podcast episodes become Published as of the time and date the Podcast is published. Any previous data is overwritten and Housekeeping does not correct it. Past episodes must be manually unpublished and republished to update their original publish dates.
Important Consideration - Does this happen with standard prefix instances as well if they create a draft podcast with pre-scheduled episodes, or is it only unique to custom prefixes?
Context
- Castopod: Beta 18
- OS: Ubuntu
- Browser: Brave
- Web server: Apache
- Custom DB table prefix instance
Possible fixes
I'm not sure. I just know that this only happened with the instance that had a custom prefix. It did not happen with my instance using the standard prefix.