Challenges and Gotchas

I did run into a couple of snags when porting the WordPress theme to the rest of the static HTML pages. InetDaemon.Com uses .shtml for its ‘static’ HTML files, that means that all the static pages can use server side includes (SSI). SSI allows me to make CGI calls, include other files and more. Several of the comments in the Wordpres theme I’m using were improperly formatted and resembled Server Side Include calls. While not intentional, it did create a problem that had to be corrected.

Here’s the problem in a nutshell. Comments in HTML look like this:

<!– your comment is placed here –>

The theme I used utilizes <div> tags with the attributes ‘id=’ which are followed by a style name represented in the CSS file as #stylename. The comment that the theme’s author used to mark the end of the style block was written thus:

<!–#stylename–>

Server Side Include directives are preceeded by the character combination ‘<!–#’ and look something like this:

<!–#echo var=”HTTP_USER_AGENT”–>

Normally, this SSI issue wouldn’t be a problem in standard HTML flat files, but I use server side includes in my web pages and the web pages are saved with the .shtml extension. The web server is configured to treat .shtml files as files containing SSI directives. So, when the web server saw the comments, and saw the ‘<!–#’ pattern, the web server assumed everything following the hash was a Server Side Include (SSI) directive, which it was not. This resulted in several errors displaying in the page stating “[an error occurred while processing this directive]”. Adding a space between the dashes and the hash mark at the beginning of the comment ‘<!– #’ fixed the problem.

Pages: 1 2 3 4

Support InetDaemon.Com