Skip to main content
Known Participant
January 12, 2010
Question

CF8 Intro Art Gallery Tutorial - No Images Displaying When Testing Course Files

  • January 12, 2010
  • 2 replies
  • 422 views

I'm hoping you can help on this one.  I have done a little Coldfusion work on my course and want to now develop a site of my own so that I can continue to learn.  I thought it would be a good idea to work my way through the CF Intro Art Gallery Tutorial Course as it seems quite thorough and I found some of it useful when doing my coursework.  So, I installed the course files and followed the initial steps and logged in to the application.

When logged in, I get the main page content but all the image links are broken.  As I haven't done anything to the course files and the test uses the OnYourOwnSolution files, I'm a bit puzzled as to why this is happening.  The images are indeed in the folder and work.  The images are being brought into the pages through included templates and through a <cfinclude> tag.  The ONLY difference between my setup and the course setup is the fact that it uses the built-in development server, thereby using port 8500, and I'm using the web development server I already have, and therefore don't need a port in the URL.  I've tried altering the paths in the various files to see if that helps but that generates an error (as I expected it would).

I'm hoping someone can tell me what it is that's wrong and how to 'fix' it, preferably without having to re-install Coldfusion with the built-in server (I suspect that might interfere with the server already set up?!)

The index.cfm file is in a sub-folder called home, as are the templates that are included (they're in templates) and the images directory is on the same level as the home and templates folders.

I also found that there was a mistake in the instructions in relation to the application datasource name, which once corrected, allowed me to load the login page and proceed successfully (with the exception of the lack of image files!)

Hope someone can shed some light on this.  Thanks.

This topic has been closed for replies.

2 replies

Inspiring
February 21, 2010

When logged in, I get the main page content but all the image links are broken.  As I haven't done anything to the course files and the test uses the OnYourOwnSolution files, I'm a bit puzzled as to why this is happening.  The images are indeed in the folder and work.

It's one thing having the image present in the file system; it's another thing whether or not the URL pointing to the images is correct.  Check the URLs, and make sure they're valid.  Bear in mind the URL for an image within an HTML doc are relative to the HTML doc's URL, and have no relation to the location of the CFM file that is generating the <img> tag.

--

Adam

Known Participant
January 13, 2010

Further information on this.

I have now setup Coldfusion with server configuration rather than adding it on to my existing web development server, so I am now set up exactly the same as the course suggests I should be and images now do display, so essentially my immediate problem is solved.

However, if anyone can tell me why I couldn't get the images to display when it was setup on existing web development server, I would still very much like to know.  I believe I had a very similar problem with this sort of thing when I was working on my assessment website (now submitted) and think it's somehow related to paths & perhaps mapping?

If not, is it perhaps because I had the course files set up in the wwwroot on Coldfusion rather than in the htdocs folder on the local web development server?

I strongly suspect this will be a problem I will experience again (i.e. getting images to display when they're in a subfolder and when they're referred to with a "../images/filename.jpg" reference.  If anyone can point me to an article that might help with explaining this, I would be most grateful.

Thanks

BKBK
Community Expert
Community Expert
February 22, 2010
...  I had a very similar problem with this sort of thing when I was working on my assessment website (now submitted) and think it's somehow related to paths & perhaps mapping?

If not, ... perhaps because I had the course files set up in the wwwroot on Coldfusion rather than in the htdocs folder on the local web development server

I think you yourself give as good an answer as you will ever receive.