I'm running two sites off of the same 4.9 installation (this is a rewrite from a 4.52 site which worked perfectly). I have a macro which serves a media image file depending on which site is showing. The content structure is as follows:
What it does is checks whether the page has a logo (different for each site) if not, it looks for its ancestor home page and gets the logo for that page. The macro finds the correct media file in all cases, but the path inserted in the img tag has the root content node in front of it so the logo does not show. Like this:
You really only should get /media/9/crimson.png returned without the path...
Is this a clean installation or have you upgraded from an earlier version? If so what steps did you take in order to do the upgrade?
(Btw I would really recommend you upgrade to 4.11.1 if it's an option, since "Empty recycle bin" does not work in 4.9 - and there is a bug with uploading an image in Internet explorer where the path is messed up...oh yeah, and rollback gives a ysod and creates DB mess...so if it's possible. Do upgrade! :)).
I'm OK with going to 4.11 if I don't have to reload the entire site - I've got quite a bit of media that takes a day to upload - is it just a matter of uploading the bin, umbraco and umbraco_client directories?
Well you should be able to upgrade without losing the uploaded media. But before you upgrade it's of course a must to make a backup of the files and the database of course. Otherwise you could end up crying...and boys don't do that, right? :-)
Multiple website media problem
I'm running two sites off of the same 4.9 installation (this is a rewrite from a 4.52 site which worked perfectly). I have a macro which serves a media image file depending on which site is showing. The content structure is as follows:
The macro is as follows:
What it does is checks whether the page has a logo (different for each site) if not, it looks for its ancestor home page and gets the logo for that page. The macro finds the correct media file in all cases, but the path inserted in the img tag has the root content node in front of it so the logo does not show. Like this:
The extra Crimson in the path is the problem. In the config file, I've tried umbracoHideTopLevelNodeFromPath both ways to no avail.
As I mentioned above, this code worked fine in another site under 4.52
Thanks for any help,
Jon
Hi Jon
That's a bit odd...
You really only should get /media/9/crimson.png returned without the path...
Is this a clean installation or have you upgraded from an earlier version? If so what steps did you take in order to do the upgrade?
(Btw I would really recommend you upgrade to 4.11.1 if it's an option, since "Empty recycle bin" does not work in 4.9 - and there is a bug with uploading an image in Internet explorer where the path is messed up...oh yeah, and rollback gives a ysod and creates DB mess...so if it's possible. Do upgrade! :)).
/Jan
Thanks Jan
It's a new clean installation.
I'm OK with going to 4.11 if I don't have to reload the entire site - I've got quite a bit of media that takes a day to upload - is it just a matter of uploading the bin, umbraco and umbraco_client directories?
Hi Jon
Well you should be able to upgrade without losing the uploaded media. But before you upgrade it's of course a must to make a backup of the files and the database of course. Otherwise you could end up crying...and boys don't do that, right? :-)
I recommend that you first upgrade to 4.10.1 following these instructions http://umbraco.codeplex.com/releases/view/91737 and then go from 4.10.1 to 4.11 following these instructions http://umbraco.codeplex.com/releases/view/98167
Hope this helps - if the strange stuff from above still happens after the upgrad let's have a closer look then :)
/Jan
Hi Jan
OK, I upgraded to 4.11.1 the backend shows up fine and all my content is there, but when I try and browse to the main site, I now get a 404 error.
Jon
is working on a reply...