Bug #22343
closedPrivate S3 image URLs on tlcdevsite.commons are not being swapped out after blog_public change
0%
Description
From https://redmine.gc.cuny.edu/issues/22313#note-7:
I was able to get the icons on the home page to appear by re-adding them in the editor.
However, this is a time consuming if I have to do this for all images across the site. Most images are now working in the front end but still do not appear in the editor view. See screenshot
Even if click "replace" and re-add the images, and I add alt text, the images do not reappear in the editor. Is this an s3 issue as well?
Laurie, can you please provide specific URLs that are affected so that I can review?
Updated by Laurie Hurson 10 days ago
Updated by Boone Gorges 10 days ago
- Category name set to S3 Uploads
- Status changed from New to Testing Required
- Assignee set to Boone Gorges
- Target version set to 2.5.5
Thanks, Laurie.
What's happening here is related to tickets #21819, #21849. In those tickets, we had to account for the fact that S3 URLs stored in the database when a site is public would need to be swapped out, on the fly, for private URLs, if the site was later switched to private. The case you've raised here is for the opposite case: Private URLs are stored in the database, but the site is later changed to public. Those private URLs are temporary, and so they expire, which is why you're seeing the 403 errors. On private sites, we have a mechanism for "refreshing" the private URLs, but we weren't running that on changed-to-public sites. On the latter, it's safe to simply remove the signed parameters, thereby making the URLs public.
This is separate from #22313 because the current ticket is about URLs stored in the database and how they're modified at render time, while #22313 is about how remove items on S3 are modified at the time of blog_public updates.
The fix is in https://github.com/cuny-academic-commons/cac/commit/e31274285a8458d0fd2aea1d25fab3e0d365994c and is pushed to production. Let me know if you're still seeing images not loading properly.
Updated by Laurie Hurson 10 days ago
Thanks for investigating Boone. This appears to be resolved. Thank you!
Updated by Boone Gorges 10 days ago
- Status changed from Testing Required to Resolved