[TYPO3] img tags being removed from plugin output

Bill Stoltz bstoltz81 at comcast.net
Wed Jul 18 04:02:07 CEST 2007


Johannes, thanks for the quick reply.

According to the code, IMAGE() calls stdWrap() at the very end. It looks 
like cImage() does the work and could filters things.

Based on the debug output from stdWrap(), what stdWrap gets, already has 
the <img> tags, so they are getting removed AFTER stdWrap.

I forgot to mention this, but yes all the image files do exist, the 
paths are correct. I put the path to each JPG into the browser and got 
each image to display. The sysfolder is not hidden, and none of the 
images in the sysfolder are hidden.

In my limited understanding, these images would have been removed before 
stdWrap() anyway, if the image was hidden.

I am sure this will be an easy fix, but I don't know typo3 Core well 
enough to know where to go next, or how best do debug.

Is there other TS debug, like that for stdWrap?

Any suggestions on other places to look?

Johannes Künsebeck wrote:
> Bill Stoltz wrote:
>> help -
>> I have a plugin that is returning content that includes html tags to be
>> displayed. All the tags are returned except for some img tags.
>>
>> I know it is not the plugin issue - but I don't know where to look, or
>> how to debug.
>>
>> I have validated that the plugin returns valid html, including <img> tags.
>>
>> I have turned on stdWrap debug, and it prints all the html and <img> tags.
>>
>> However, if I turn off debug, and view the html source that is
>> generated, then some, but not all <img> tags are removed. The <a> tags
>> that were around the <img> are still there.
>>
>> The best I can figure is that something that eventually calls stdWrap
>> must be stripping out the images, but I can't tell what routine is doing
>> this.
>>
>> Any ideas on where to look? other debug I can turn on?
>>
>> I don't know if it matters, but the plugin that I am using is
>> macina_banners.
>>
>>
>> ---------------------------------------------------------------
>> page source code showing missing <img> tags - not banneruid=25 is
>> missing <img> tag
>> ----------------------------------------------------------------
>>         <!--  Plugin inserted: [begin] -->
>>            
>> <!--- banners Module extension begin -->
>> <table border="0" cellpadding="0" cellspacing="0">
>>
>>   <tbody><tr>
>>     <!--- banners Module row begin -->
>>     <td align="left" valign="middle"><div style="margin: 0px;"><img
>> src="typo3temp/pics/1771f39da6.jpg" alt="" title="" border="0"
>> height="59" width="468"></div>
>>
>> </td>
>>     <!--- banners Module row begin -->
>>   </tr>
>>     
>>   <tr>
>>     <!--- banners Module row begin -->
>>     <td align="left" valign="middle"><div style="margin: 0px;"><a
>> href="index.php?id=659&amp;no_cache=1&amp;no_cache=1&amp;tx_macinabanners_pi1%5Bbanneruid%5D=25"></a></div>
>>
>> </td>
>>     <!--- banners Module row begin -->
>>   </tr>
>>     
>>   <tr>
>>
>>     <!--- banners Module row begin -->
>>     <td align="left" valign="middle"><div style="margin: 0px;"><a
>> href="index.php?id=659&amp;no_cache=1&amp;no_cache=1&amp;tx_macinabanners_pi1%5Bbanneruid%5D=24"><img
>> src="typo3temp/pics/8dd595eff1.jpg" alt="" title="" border="0"
>> height="64" width="468"></a></div>
>> </td>
>>     <!--- banners Module row begin -->
>>   </tr>
>>     
>> ---------------------------------------------------------------
>> output from stdWrap ..... banneruid=25 had <img> tag
>> ---------------------------------------------------------------
>>     <!--  Plugin inserted: [begin] -->
>>            
>> <!--- banners Module extention begin -->
>> <table border="0" cellpadding="0" cellspacing="0">
>>
>>   <tr>
>>     <!--- banners Module row begin -->
>>     <td align="left" valign="middle"><div style="margin-top:0px;
>> margin-right:0px; margin-bottom:0px; margin-left:0px; "><img
>> src="typo3temp/pics/1771f39da6.jpg" width="468" height="59" border="0"
>> alt="" title="" /></div>
>> </td>
>>     <!--- banners Module row begin -->
>>   </tr>
>>     
>>   <tr>
>>     <!--- banners Module row begin -->
>>     <td align="left" valign="middle"><div style="margin-top:0px;
>> margin-right:0px; margin-bottom:0px; margin-left:0px; "><a
>> href="index.php?id=659&amp;no_cache=1&amp;no_cache=1&amp;tx_macinabanners_pi1[banneruid]=25"
>>> <img src="uploads/tx_macinabanners/BariItalianFoodsWebBanner468x60.gif"
>> width="468" height="60" border="0" alt="" title="" /></a></div>
>> </td>
>>     <!--- banners Module row begin -->
>>   </tr>
>>     
>>   <tr>
>>     <!--- banners Module row begin -->
>>     <td align="left" valign="middle"><div style="margin-top:0px;
>> margin-right:0px; margin-bottom:0px; margin-left:0px; "><a
>> href="index.php?id=659&amp;no_cache=1&amp;no_cache=1&amp;tx_macinabanners_pi1[banneruid]=24"
>>> <img src="typo3temp/pics/8dd595eff1.jpg" width="468" height="64"
>> border="0" alt="" title="" /></a></div>
>> </td>
>>     <!--- banners Module row begin -->
>>   </tr>
>>     
>>
> 
> 
> I think the images are made with the IMAGE-cObj.
> When it does not generate an image (for example, because it does not find the original image file) , it outputs no image tag.
> It looks like all images are scaled by typo3 to 468px width but the one that's missing already has the right size (using the original filename, not typo3temp/pics)
> So a quickfix could be to upload the image (ariItalianFoodsWebBanner468x60.gif) a little bit bigger.


More information about the TYPO3-english mailing list