Hello, I have my web page set up and using template variables for a few different images across my homepage.
There is a banner image at the top which is controlled by a template variable, and there is a picture about midway down the page as well. The midway image has a text template variable next to it.
The banner image was working before, but will not any longer. The little loading icon comes up, but that is it. The image itself never actually loads. Chrome Dev Tools states an image not found error.
For the image midway down the page, this TV always loads. No problem whatsoever. I even selected the same photo that is supposed to be used for the banner, and it loads fine. All of the text template variables load fine as well.
What would be causing the image not found error? How can I debug this further?
[ed. note: brickthenick last edited this post 8 years, 6 months ago.]
First try clearing your cache both in the manager and in the core/cache folder manually.
Secondly, are you using anything to process the image to the front end such as pthumb or just calling the tv straight? Is the image tv assigned to a certain media source?
Can you post the line in your chunk/template where you're calling the image?
Output should be default rather than image
If set to default, the little loading icon doesn't even show. It just acts as if the TV isn't even input. Still getting the 404 not found error in dev tools.
When you inspect the markup what is being posted out when it is set to default ?
You have two options for an image related to a TV.
1. You can set the output to image and just put the path to the image as the TV value. In that case MODX creates the entire img tag.
2. You can set the output to text and, again, put the path to the image as the TV value. In that case, you need to create the image tag yourself:
<img src="[[*tvName]]" alt="something">
If you mix the two options, you get no image.
What LK was suggesting is to look at the source of the page (Ctrl-U in most browsers) and see what HTML is actually being produced to display the image. That will almost always give you a clue to why the image isn't showing up.
Your markup suggests that the image in question is being handled by jQuery Slider Plugin:
https://revolution.themepunch.com/jquery
If the missing images are handled by Slider, and the images that are displaying correctly are not handled by Slider could there be a problem with your Slider javascript files not loading correctly?