generated from ITwrxOrg/EZ-Bkup
Media type change deletes old file even without a site deploy, breaking live site #5
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When a user changes the media type for a page, it deletes the old media type to keep from having unused files piling up on the filesystem. That's all well and good, but since it deletes without a "site deploy" the site doesn't have the image anymore for the still currently-deployed site. Will have to refactor to prevent that from happening, as changing/saving new site state without it affecting the live site without "site deploy" is supported.
This has been refactored in dev and now deletes the unused media on site deploy. An interesting side effect is that now when you're editing a page, SSM "remembers" any media you add to the page, so when you change the mediaType and save the page, the media for the previous media type is still there if you switch back. This freaked me out at first, as i thought more redesign would be necessary, but it's actually a fairly logical behavior, as all the media you add for a page is there unless you choose to delete it, but SSM will delete unused mediaTypes when you deploy, as keeping staged videos around for no good reason will use too much space.