Click to See Complete Forum and Search --> : guestbook trouble (apache server, "mscript"


CarolW
04-16-2005, 06:04 PM
I was chortling along converting each of my pages from old to new layout when suddenly I got a terrible shock - YIKES!

I changed to using SSIs (including vertical nav, which I'll sometimes alter, and need only a few versions of) - when suddenly, I converted my guestbook, and this, I validated, as always, by file upload first, before uploading. But now that I'm using SSI, I also submitted the URL from online on my site.

O MERCY ON ME!

My guestbook didn't validate. (It did before it went online.) Oh, well, the script is vintage 1997, and I'm using DocType XHTML 1.0 Strict, which probably didn't quite exist yet.

My code is only very trivially altered from the original, which you can see at:

http://helpdesk.islandnet.com/help/guestbook.php

You can find a guide to Mscript at:

http://helpdesk.islandnet.com/mscript/

If you want to see what's happening, you can pick it up at:

http://www.coherentdog.org/guestbook.htm

Just try to validate that page, and you'll see what I mean.

I spent hours editing the guest.dat file (right in my www directory) manually, changing <p> (at the ends of paragraphs) to </p>, and adding <p> before the <i> that the script starts a paragraph with.

Also changing <br> to <br />

Well, that was insufficient; there's something MISSING, such as, "object, map, button ..... " and I can't remember what else, but you might be familiar with such a list; I've seen it myself often enough, and usually all I had to do was fix a missing quote mark or something like that, but here, it looks different to me, and I haven't the slightest idea what to do with it or about it.

Can anybody help? I'd be so grateful! thanks in advance!

Sat, 16 Apr 2005 15:02:45

CarolW
04-17-2005, 08:24 PM
<snippety snip snp>

O MERCY ON ME!

My guestbook didn't validate. (It did before it went online.)
Can anybody help? I'd be so grateful! thanks in advance!

<snippety snip again>

Sat, 16 Apr 2005 15:02:45

Oh my doG! I solved this!

Here's how.

First, I slept overnight, so as to be very, very daring today, so today, I put up my edited version of the script, and changed it in two ways; I guessed how to put in formatting codes (a tiny bit of HTML) so the script would write them to the data file, and also, I changed the name of the script and of the data file, so as to be able to put up a test guestbook, so my regular one, invalid as it was, could continue.

I still got validation errors after running a test on the new test guestbook but began to see where the errors might be, and also, the script mostly worked, at least as well as the other one, which meant I hadn't broken it by editing it. Wow! That's incredible, for me!

So then I used View Source (from online, of course), and then - tada! - I used verbose validation, asking for Parse Tree. Boy, that was interesting! I saved a lot of it in a text file.

I freaked a bit when I saw:

"<br></br>"

but then I realize the parser was translating "<br />" as "<br></br>"; haha, what a shock. It makes sense, though!

My source showed an extra <p> where one didn't belong - I couldn't imagine where it was coming from, so I checked the script - nope, not coming from there. Then it must be coming from my HTML page!

So I looked at that again, and saw:

[code]
<p>
[include statment here]
</p>
[/code?

so I thought, well, maybe the data file that gets included somehow stops the HTML page from being read right there, for a moment, so the "</p>" after the inlcude statement is lost, leaving that extraneous "<p>" before the include statment. Actually, come to think of it, what would a <p> before a data file being included do anyway? I'm not sure it makes sense, especially because the first content in the data file, after my alterations, becomes <h4>header</h4>

OH, MY DOG! I GOT it! So I deleted the <p> and </p> - and BAM, the whole thing worked, validated, and everything else good.

So, after that work to set up a test guestbook, it got retired (as a test guestbook, anyway), before I even really got it going, and I altered my original script and HTML page, and it's all validating without a hitch.

Of course, my special scenting/retrieving/household-helper dog wants to keep the test guestbook, so I gave it to him. My other dog says, then I want the other one, and she's more than earned it, so I gave it to her.

[deadpan]

Sun, 17 Apr 2005 17:18:58