Hello world doesn't work!

design

#1

I there a setting to turn off automatic html generating/writing on the dreamhost side of things? My code is being wrapped within generated code that I didn’t write. I am using text edit like I have used many times successfully in the past, but I have never used dreamhost.

Here is the simple index file I wrote to have hello world on the screen (alderdesign.com):

Hello World

hello world


#2

That is really strange, because I cannot replicate your report, I just copy-n-pasted the code from your post into a file named testhtml.html, saved the file, and browsed to it on my server, and got exactly the expected result:

http://maddogz.com/testhtml.html

… and viewing source of the rendered page, I see precisely what I entered.

I am a little unsure of exactly which editor your are referring to as “text edit”, and am wondering if the is a *nix line-ending issue here?

It might help if you would share what “automatic html” was generated. There is no such facility installed on our side of things, so I would be anxious to see the code you are referring to here. Can you provide a link to your index.html file?

–rlparker
–DreamHost Tech Support


#3

The “automatic html” that was generated:

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">< /p>

Hello World

hello world

I don’t really understand what you mean by “*nix line-ending issue” … is it similar to the dreamhost support I recieved via email? Maybe the email I recieved’s idea is similar to yours? I just don’t understand either. Maybe if you could explain in more layman’s terms? His answer was:

Looking at the code, it looks like what you’re attempting to enter for the page at large is populating in the body of the page. So, if I had to take a stab at it I’d say that you’re entering the data entirely in to the body rather than the different sections of the page itself. What tipped me off here is that at the top of the file you see:

…and then between the body tags you see:

Hello World

…which suggests that when you typed in “Hello World” you entered that
in to the body rather than the actual title.

When I checked http://maddogz.com/htmltest.html, I got the following:

Not Found
The requested URL /htmltest.html was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Thanks for your help :slight_smile:


#4

i used notepad instead of text edit and it worked. weird. thank you sooooooooooooo much for your help. i am still curious what is wrong with my text edit though :stuck_out_tongue:


#5

Yikes. First of all, my mistake on the example url; I am sorry. My test file is at:

http://maddogz.com/testhtml.html … I hate it when I do that! I’ll also go back and correct my original post. :wink:

Note the entry in your code above: meta name=“Generator” content=“Cocoa HTML Writer”

There is your clue, and that is the reason for any/all “automatic code generation”. This “html” editor is not precisely replicating the code you are entering.

No, this is a different issue altogether, and is a moot point now having seen the actual code that was output by your “Cocoa HTML Writer”. If you are curious about *nix line endings, there is probably more than you would ever want to know about them on Wikipedia’s article on “Newline”.

I won’t go as far to speculate about how/why “Cocoa HTML Writer” did that to your code the way the TS representative did - I don’t know the product, or how you used it. I general, most of these types of HTML editors will munge your actual input code to some degree or another unless you disable them from doing that (assuming it even has such an option). One solution to that problem is to use a pure text editor rather than an HTML editor if you can’t find a setting in the “HTML Writer” to cause it to refrain from “fixing” your entered code.

–rlparker
–DreamHost Tech Support