Steve Ward
Steve Ward

Reputation: 1217

Sitecore - not publishing media library

We are using Sitecore 6.5 and have a multi-site Sitecore solution (with lots of library code we have inherited)

Publishing the Media Library by item from Staging to Production but we are not seeing the image on the web.

The images are in the web database and the path to the images in the web site is good.

Error we are getting when the file is requested (same in browser window address bar) is http://domainname/error?aspxerrorpath=/~/media/OSS/Images/WaterAndWildlife/myimage.jpg.

There is no media prefix in the web.config

Any idea?

....Looking into it now but site is going live tomorrow so help very appreciated! Help!!

Upvotes: 0

Views: 2583

Answers (2)

jaya
jaya

Reputation: 11

We faced a similar problem when, in production, media files were not published which resulted in 404 errors.

Solution: The problem was that media files were not saved to the database because a file path was provided with the Sitecore media files while uploading.

So the images were saved on the file system instead of in the database. But based on our web.config configuration we were fetching images from the database.

If you are facing a similar issue, just download the media image, remove the file path, and save it. Then re-upload the same image, save and publish the image.

Hope your problem will be solved.

Upvotes: 1

Nazo Tajrian
Nazo Tajrian

Reputation: 41

One question, are these staging and production environments separate code files? if they are, what is the setting in your web.config for the settigns UploadAsFiles? because if that's true it will store them on server and the images will be on staging but not on prod. But usually if this setting is true and the files are getting stored in file system, specially in CM/CD environment it should push the physical files on publish as well, but sometime there might be other issues going on like permission etc..... and the files cant get to the destination.

 "<setting name="Media.UploadAsFiles" value="false">"

Upvotes: 0

Related Questions