Media type change deletes old file even without a site deploy, breaking live site #5

Closed
opened 2025-05-19 12:15:34 -05:00 by ITwrx · 1 comment
Owner

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.

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.
ITwrx added the design flawinvestigating labels 2025-05-19 12:15:34 -05:00
ITwrx added fix in dev and removed investigating labels 2025-05-30 09:45:47 -05:00
Author
Owner

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.

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.
ITwrx removed the design flaw label 2025-06-06 10:50:33 -05:00
ITwrx closed this issue 2026-01-25 09:23:32 -06:00
Sign in to join this conversation.