i am using the {content_image} function in a template to show different myimage? on every page. but the image doesn`t load directly, when it is the first call of the page. after a reload the picture shows up.
i used {content_image block='MyImage?' dir='images'} to put the pictures on the page. what can i do?
btw, cmsms AND the community are incredibly helpful!
keep up the great work thx alot in advance!
utor
{content_image} myimage? shows only if I "reload"
{content_image} myimage? shows only if I "reload"
Last edited by utor on Thu Jan 28, 2010 12:40 pm, edited 1 time in total.
Re: {content_image} myimage? shows only if I "reload"
i "solved" the problem by using javascript window.location.reload(); but i dont`t think that`s the last word in this. anyone some better idea, maybe?

thx
utor

thx
utor
Re: {content_image} myimage? shows only if I "reload"
I too have seen this problem.
I have done a bit of looking at the code and here is what I am seeing.
If I do a view source in Firefox the image code looks ok
However, because firefox creates a clickable link in the view source code to view the image, if I click it it actually tries to path to the following:
Obviously the %EF%BB%BF isnt supposed to be there. As utor mentioned above this only happens on the first page load. If the page is refreshed then the image usually loads.
Does anyone have any ideas on how to correct this?
LadyHLG
I have done a bit of looking at the code and here is what I am seeing.
If I do a view source in Firefox the image code looks ok
Code: Select all
<!-- Begin Header Image-->
<div id="header">
<img src="uploads/images/pageheaders/mainimage21.jpg" name="HeaderImage" alt="Header Image." />
</div>
Code: Select all
http://dell-4/sandbox/%EF%BB%BFuploads/images/pageheaders/mainimage21.jpg
Does anyone have any ideas on how to correct this?
LadyHLG
Re: {content_image} myimage? shows only if I "reload"
I wanted to share a bit about what I have found and my possible solution.
I believe this behavior has something to do with Smarty and caching, but as I am just now learning CMSMS and Smarty I really dont have a clue as to what is happening or why, perhaps someone with a better understanding of both can offer some insight.
From what I see those special characters are not in the database record for the content_image variable which is why I thought maybe somehow smarty was introducing them, but again, I cant be completely sure.
My fix, which seems to be working (so far with testing) was to add the following at about line 33 of the function.content_image.php file:
That would be just after:
I do hope someone a bit more in the know can at least confirm this was a reasonable solution.
Thanks
LadyHLG
I believe this behavior has something to do with Smarty and caching, but as I am just now learning CMSMS and Smarty I really dont have a clue as to what is happening or why, perhaps someone with a better understanding of both can offer some insight.
From what I see those special characters are not in the database record for the content_image variable which is why I thought maybe somehow smarty was introducing them, but again, I cant be completely sure.
My fix, which seems to be working (so far with testing) was to add the following at about line 33 of the function.content_image.php file:
Code: Select all
$result = filter_var($result, FILTER_SANITIZE_URL);
Code: Select all
$result = $smarty->fetch(str_replace(' ', '_', 'content:' . $params['block']), '', $pageinfo->content_id);
Thanks
LadyHLG
Re: {content_image} myimage? shows only if I "reload"
that's utf-8 BOM (byte order mark).. you need to figure out where it's coming from.
someone else had a similar issue recently
http://forum.cmsmadesimple.org/index.ph ... 004.0.html
someone else had a similar issue recently
http://forum.cmsmadesimple.org/index.ph ... 004.0.html
Last edited by kermit on Wed Jun 23, 2010 5:46 pm, edited 1 time in total.
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
Re: {content_image} myimage? shows only if I "reload"
kermit,
Thank-you for pointing to the other thread!
I didnt see it during my searches on the issue (of course I had no idea what to look for..)
It looks like the TrueTypeText mod is the cause of the issue, and now I am wondering is that BOM is why that mod does not work for Firefox?
So how do I find it in the mod?
LadyHLG
Thank-you for pointing to the other thread!
I didnt see it during my searches on the issue (of course I had no idea what to look for..)
It looks like the TrueTypeText mod is the cause of the issue, and now I am wondering is that BOM is why that mod does not work for Firefox?
So how do I find it in the mod?
LadyHLG
Re: {content_image} myimage? shows only if I "reload" [Solved]
Another update - I used a BOM detector to search through the files for the TrueTypeText Mod and it found BOM's at the beginning of 26 different files.
After removing them the problem with the images defiantly went away, however the mod still does not work in Firefox, so apparently there are still other issues with it.
LadyHLG
After removing them the problem with the images defiantly went away, however the mod still does not work in Firefox, so apparently there are still other issues with it.
LadyHLG