Jump to content

Cannot Load Content With Initial Page Load


Recommended Posts

Request: I need some help understanding how to trouble shoot the following problem.

 

Symptoms: I load a feedback form with each page of my blog, the form is loaded using Javascript. However, on the home page the first time you visit the SITE the form will not load. HOWEVER, if you enter the site by going to a different page then the form loads and if you then return to the home page, using the menu, the form loads as expected. So this condition occurs on entry to the site and, as far as I can detect, only occurs on the home page.

Using firebug I see a reported internal error 500. After some researching I found that I needed to look in the server error log so I went to the C-panel and reviewed the log. If I load the home page to create the error again there is no mention of it in the server error log (I assume I'm looking in the right place, in the C panel under Logs?).

 

Questions

  • Should the '500' error show in the error log
  • If '500' errors should be in the log what is the reason mine is not appearing
  • Any suggestions on how to troubleshoot this type of problem.

 

Other Thoughts:

I suspect that the problem is that the file containing the form is not being found for the home page on the initial request. However, I'm baffled as to how this could occur. Since the form is loaded via a script the same process is used for every page so how could one page cause the file to be not found. If the form never loaded on the home page that might give some clue but once its loaded on another page then it will load on the home page.

 

I don't believe that this is a scripting problem per se but this still seemed to be the best place to ask the question.

 

I'd appreciate any answers to my questions above and any guidance on how I might troubleshoot to find the source of my problem.

 

Thanks

Link to post
Share on other sites

Try looking at Latest Visitors in addition to the Error Log. There are occasionally some situations (it has varied with server configuration) where the user gets one response, but that response triggers a different error, and only the last response is logged.

 

As a made-up example (because I can't recall a specific real one), let's say a 500 error occurs, but there is no file (page) set up on the server for sending a response of 500. That would cause a 404-Not Found, and the log would only show the 404. The page the user sees probably says something like "...in addition, a 404 error occurred..."

 

So: request the page and compare what (if anything) is in the Error Log for that request against what's shown in Latest Visitors for that exact same request and for any of its dependency files, also compared against what you actually saw in your browser. Comparing the 3 could shed some light on what's going on.

 

Is there any chance that the way you call the file on your home page is different from how you do it everywhere else, such as if there's a typo in the home page link but it's fine on all other pages? Or the link is specified by an absolute path on the home page and a relative path everywhere else? Or the link in the script is specified by a relative path that is correct for most pages but isn't a valid path relative to the home page location? Or other things along those lines?

Edited by SteveW
Link to post
Share on other sites

Try looking at Latest Visitors in addition to the Error Log. There are occasionally some situations (it has varied with server configuration) where the user gets one response, but that response triggers a different error, and only the last response is logged.

 

As a made-up example (because I can't recall a specific real one), let's say a 500 error occurs, but there is no file (page) set up on the server for sending a response of 500. That would cause a 404-Not Found, and the log would only show the 404. The page the user sees probably says something like "...in addition, a 404 error occurred..."

 

So: request the page and compare what (if anything) is in the Error Log for that request against what's shown in Latest Visitors for that exact same request and for any of its dependency files, also compared against what you actually saw in your browser. Comparing the 3 could shed some light on what's going on.

 

Is there any chance that the way you call the file on your home page is different from how you do it everywhere else, such as if there's a typo in the home page link but it's fine on all other pages? Or the link is specified by an absolute path on the home page and a relative path everywhere else? Or the link in the script is specified by a relative path that is correct for most pages but isn't a valid path relative to the home page location? Or other things along those lines?

 

Thanks so much for your response, I appreciate you helping me fill in my knowledge gaps.

 

This problem appears to have been caused by my inconsistent use of the url format. The blog is in a subdomain but I set up the the blog with the url in the format

 

www . example . com / subdomain

 

instead of

 

subdomain . example . com

 

For the most part I make links using the www format but occasionally I've used the subdomain format.

 

I discovered that consistently using the subdomain format appears to solve the problem.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...