I have a site working quite nicely on MT4.01 (artformhomeplans.com). There are some quirks with Custom Fields so we wanted to upgrade. I upgraded from 4.01 to 4.13 and then to 4.32. I have staged the site on a spare domain first, steele-marketing.biz.
Testing seemed to go well, until we added a new entry. You'll see that the site can display sample house plans for selected series of houses. But if you go to "expandables" on each site, you'll see that the old site and the new site ONLY for old/prior data, displays the thumbnails correctly, but new site displays the thumbnails as a "View Image" link instead of the thumbnail image itself. The source code is the same.
But MT creates page entries with two different outputs! Sample:
View image
and then a few lines later for the next image:
In the first case I get "view image" and in the second I get the image.
Is there a new parameter or something I missed in 4.32, did the d/b not convert or ?... thx.
Reported on Movable Type 4.3
Hi Lee,
Unfortunately, as you didn't strip the angle brackets "<" as "<" and ">" as ">" I cannot see your current coding.
However, assuming that your image custom field is EntryDataMyField, your coding should look like:
What you should include now is the inner "mt:EntryDataMyFieldAsset" loop ;)
Hi Mihai,
Sorry about that... Here is the code with angle brackets stripped off:
MT code:
MT generated code for first “image”
And MT generated code for second image
If all this is too messy you can download a Word doc with the code and the picture of the problem, at
http://www.steele-marketing.biz/download/cf_problem.doc .
You go to the website itself and click on expandables (ie, http://www.steele-marketing.biz/plans/expandables/ ) where the problem will be obvious (and you can "view source" too)
Thanks
Lee
I guess that instead of using an image custom field, in fact you are using a text single or multiple line field (textarea).
Is that the case?
Assuming that is the case, you have to extract the image URL.
I've coded a plugin for that in the past. Not sure if it works with MT v4.x (it was for v3.x).
Alternatively you could extract the image with the Brad Choate's Regex and EmbedImage plugins.
Hi Mihai, hmmm, this could be it. Yes, the image custom field is the text of its filename. This worked prior to the new custom fields.
Could you repost your first reply code? It didn't have the angle brackets stripped off either, so the code section is blank. I'd like to replace my code with yours to see it this fixes the problem.
Assuming this is the problem, why does the existing code work for images entered in prior versions of MT but not the new? I went through many records for many fields in many tables and cannot see a difference between an image entered in the old version and an image entered into the new version...
Actually, I checked again. The images fields are definately set to image custom fields, not text.
Is there a (perhaps new) MT parameter that says to embed an image or display a link to an image?
More info.
With original code that worked in 4.01:
the image was displayed. But any new image asset was displayed as a hyperlinked "view image".
I changed the code to
and now the new images display. BUT NOW THE OLD IMAGES DON'T...