Project

General

Profile

Actions

Support #16291

closed

Images coming up blank in Media Library

Added by Marilyn Weber over 2 years ago. Updated over 2 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
Site cloning
Target version:
Start date:
2022-06-23
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

Via ZD, Benjamin Swett writes:
"On a cloned site, new images I try to upload to the media library are coming up blank in the media library and I am unable to use them as new site headers. Am I doing something wrong or is there something wrong with this cloned site? Thanks so much for your help."
The site is https://humansandanimalscompositionfall2022.commons.gc.cuny.edu/. I attach an image of the empty items. LMK what else would be helpful. Thanks!


Files

Annotation 2022-06-23 143422.jpg (101 KB) Annotation 2022-06-23 143422.jpg Marilyn Weber, 2022-06-23 02:35 PM

Related issues

Related to CUNY Academic Commons - Feature #12134: Site cloningResolvedJeremy Felt2019-11-22

Actions
Actions #1

Updated by Raymond Hoh over 2 years ago

Actions #2

Updated by Raymond Hoh over 2 years ago

  • Category name set to Site cloning
  • Status changed from New to Staged for Production Release
  • Assignee set to Raymond Hoh
  • Target version set to 2.0.2

Hi Marilyn,

I was able to determine the problem. I've fixed the issue on the humansandanimalscompositionfall2022.commons.gc.cuny.edu site by removing an .htaccess file that shouldn't have been cloned to the new site's upload directory.


I've added Jeremy and Boone as watchers.

The issue is due to cloning a private site. For private sites, we add an .htaccess file to the site's upload directory to prevent hotlinking to the media asset for non-logged-in users. When a private site is cloned, it also copied the previous site's .htaccess file, which caused the broken images and wrong redirection to the previous site.

To fix this, I opted to delete the new .htaccess file if it was cloned from the previous site and re-generating the .htaccess file if the new site is private after the initial attachments are copied over: https://github.com/cuny-academic-commons/cac/commit/89c02e35658223372edfac26927e57074bc914bd

I'm not sure how many cloned, private sites are affected by this. We should have heard more reports if that were the case.

Actions #3

Updated by Marilyn Weber over 2 years ago

Thanks, Ray!

Actions #4

Updated by Boone Gorges over 2 years ago

  • Status changed from Staged for Production Release to Resolved
Actions

Also available in: Atom PDF