Hunting down a broken image
Unexpected issues are part of the game when it comes to development its almost impossible to plan in advance every issue we might face. In the last video we noticed that one of our images where not loading on our server. We are out to fix that problem in this session.
Video Transcript
00:00Now, one of the stuff that's really weird is if we go onto our local version and I'm
00:04just going to click on refresh, you'll see that locally, there's no issue.
00:08But for some reason, not locally, we do have an issue.
00:11So one of the first things that we're going to do is we're just going to open Firebug
00:14and I'm going to just inspect with Firebug.
00:17If we recall, we had our net version, our net section and once we're in it, I'm going
00:22to click on refresh.
00:24Now once I click on refresh, I'm going to see everything and now we're going to
00:26see that there's a file that's missing, which is called learnxmlnow.com
00:30slash images slash Java with an uppercase J.
00:34So we're going to go into our Cyberduck right into that folder.
00:39So if we're going to close that for a second, we're in images and we're looking
00:42for a file that's called Java.
00:44So let me just click your J and we'll see that we have Java and Java O, PNG.
00:51It seems like both of them do exist.
00:53So let's look at this again and see why is it not finding it?
00:56Is there any spelling differences in anything here?
00:59Do you see any difference between this and this file?
01:06So we have your images.
01:07We have your images here.
01:08Let me open this up with a copy location.
01:10We're going to open it up in a completely new window to try to see what's going on.
01:14Why is it not finding it?
01:16So first of all, it's not finding it obviously as we've expected, but images
01:22that looks all good.
01:23Java is lowercase, right?
01:27And basically because we're running on a Linux server, the uppercase and lowercase
01:30have a big, big meaning.
01:32Now this is a very big no-no that our developer did that he should be really
01:36reprimanded for is you never use uppercase, lowercase with files on a server.
01:41You always keep all the files at lowercase.
01:43So what I'm going to do, I'm just going to go inside here and I'm going to
01:46lowercase that to be Java in lowercase.
01:50And let me just find all everything else here.
01:52If there's anything else that's uppercase, it looks like only those two,
01:54he did that.
01:55So now both the files are going to be in lowercase.
01:58And what I'm going to do now is I'm just going to go into our file.
02:00I'm going to open it up in, oopsie, that's our codes for our AdWords course.
02:05That's not the right one, right?
02:06So we're going to do that again so people could look at it again.
02:10All right, so let's open up the file.
02:15Let's actually open up the HTML itself.
02:17And I'm going to open it right up using Sublime Text.
02:23There we go.
02:23So here's our Sublime Text.
02:24Let me make it a little bit smaller so we could look at it.
02:27And I'm just going to look for Java.
02:30Oopsie.
02:32Going to just look for Java.
02:37And it was java.png.
02:39So you can see uppercase here for the J.
02:41I'm just going to make sure it's going to be lowercase.
02:44And I'm going to search for the next instance of Java.
02:49Let's see.
02:51I'm just going to run through it quickly instead of, well,
02:55or I could look at the file.
02:56Let's just do .png.
02:59Save us some time.
03:01OK, so here we go.
03:02Java with the upper J. That's low, low, low.
03:09That covers it.
03:10So let's click on Save.
03:11And I'm going to upload it back onto the server again.
03:14So the files are up to date on the server itself.
03:16And the reason why it's working locally
03:17but it's not working on the server itself,
03:19do you know why, Itamar?
03:21Well, if it's an Apache server, if it's in the next server,
03:23then it wouldn't be able to read the Java J, capital J.
03:29Right, exactly.
03:31So basically, what's going on is that on the server,
03:34it can't, but because we're working locally
03:36and it's not really a server, our local file system
03:39treats index.html and uppercase index.html
03:42as the same file.
03:44But on the server itself, it's not
03:45considered as the same file.
03:47So now that we've corrected that, once we click on Refresh now,
03:51we should see our file.
03:52Well, it should be lowercase, right?
03:55And when we go into our site itself and click on Refresh,
03:59I'm going to close that up.
04:00Click on Refresh.
04:01We should get all the images and everything
04:03should be aligned as the way they should.
04:05OK.
