Fixing Joomla 1.5 invalid XHTML Markup validation because of mod_search

I don’t get it! Why the W3.org XHTML validator said my joomla installation page is an invalid XHTML page. After check the error messages, it show that line 88 on column number 42 and 43 had an error like this,

Line 88, Column 43: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified

<input type="hidden" name="Itemid" value=1 />

and after a moments search the source of error, it seems came from the search form default value that not quoted properly.

Shortly, to fix this issue, go down to edit template file on mod_search on file named default.php


{YOUR_JOOMLA_INSTALL_ROOT_DIRECTORY}/modules/mod_search/tmpl/default.php

around line 42 quote the default value properly

<input type="hidden" name="Itemid" value="<?php echo $mitemid; ?>" />

and recheck the page XHTML validation, on my installation, it works to fix the invalid XHTML page.

Comments are closed.