I really can't seem to find out why this is happening, but I'm having the following issue when attempting to display an image on a page.
1. The image was uploaded into the file manager2. The image was added to a page using the XHTML editor3. Image displays whilst logged in on this pageNow here's what I'm doing with that image:The image is part of an advert that can be shown on any page within the site. The advert containing the image is loaded onto the page. This works fine whilst in admin mode; however when viewing the page normally, the image will not display. All surrounding text will.On inspecting the page I can see that there is an additional style attribute added to the image:style="display: none !important; visibility: hidden !important; opacity: 0 !important; "To make the above clearer, here is the code that actually gets the advert text:
var pageBase = HttpContext.Current.Handler as PageBase;
PageData currentPage = pageBase.CurrentPage;
var links = currentPage.Property[AdvertPropertyName].Value as LinkItemCollection;
if (links != null)
if (links.Count > 0)
var random = new Random();
int number = random.Next(links.Count);
PageReference pageLink = PageReference.ParseUrl(links[number].GetMappedHref());
PageData pageData = DataFactory.Instance.GetPage(pageLink);
AdvertLiteral.Text = pageData.Property["MainBody"].Value.ToString();
I'm presuming it's some sort of permissions thing, but can't see what.Any help greatly appreciated.Thanks,
That style-attribute must come from something built into your project...
If you suspect permisson problems you could try to add Everyone role to the file manager directory in question.