OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



markup validation of ojs pages

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

markup validation of ojs pages

Postby zharel » Tue Nov 06, 2007 11:13 am

Most of the OJS 2.1.1 pages are found to be invalid when checked by the W3C markup validation service. There are three repeating errors:
  • The
    Code: Select all
    <?xml version="1.0" encoding="UTF-8"?>
    tag doesn't appear in the beginning of the document, since it is preceded by one ore more empty lines.
  • The <html> tag is wrong for XHTML1.0. It should be
    Code: Select all
    <html xmlns="http://www.w3.org/1999/xhtml">
  • the <frameset> tag doesn't have the frameborder, framespacing and border attributes.

I attach a patch to fix this. There is still another problem, which is related to the fact that the ampersand in query URLS is not encoded as &amp;, but don't have a patch for this.
Attachments
patch.zip
zipped templates.patch (text/plain)
(8.13 KiB) Downloaded 21 times
zharel
 
Posts: 29
Joined: Tue Oct 30, 2007 10:00 am
Location: Haifa, Israel

Re: markup validation of ojs pages

Postby asmecher » Tue Nov 06, 2007 11:57 am

Hi zharel,

Thanks -- we've corrected a number of validation problems for the next release, although minor ones still remain. We'll be doing some validation testing periodically and fixing the issues that come up.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: markup validation of ojs pages

Postby zharel » Tue Nov 06, 2007 1:09 pm

The other problem I referred to in my posting was unescaped URLs. This is a patch to one of these:

Code: Select all
--- templates/common/header.tpl.~20060710190229~   2006-07-10 22:02:29.000000000 +0300
+++ templates/common/header.tpl   2007-11-06 21:56:39.000000000 +0200
@@ -87,7 +86,7 @@
    {foreach from=$pageHierarchy item=hierarchyLink}
       <a href="{$hierarchyLink[0]}" class="hierarchyLink">{if not $hierarchyLink[2]}{translate key=$hierarchyLink[1]}{else}{$hierarchyLink[1]}{/if}</a> &gt;
    {/foreach}
-   <a href="{$currentUrl}" class="current">{$pageCrumbTitleTranslated}</a>
+   <a href="{$currentUrl|escape}" class="current">{$pageCrumbTitleTranslated}</a>
 </div>
 
 <h2>{$pageTitleTranslated}</h2>


If there is something I can do to help with testing the development code, I'll be happy to do it.
Anyway, I'll try to install a second OJS system directly from the CVS head to see what issues still remain.
zharel
 
Posts: 29
Joined: Tue Oct 30, 2007 10:00 am
Location: Haifa, Israel

Re: markup validation of ojs pages

Postby zharel » Tue Nov 06, 2007 11:10 pm

I checked out the current CVS, and it seems all my fixes are already there, except one: the <frameset> tag with the wrong attributes.
Code: Select all
/usr/local/src/build/ojs2/templates$ grep -r '<frameset' .
./article/view.tpl:<frameset cols="*,180" frameborder="0" framespacing="0" style="border: 0;">
./submission/layout/proofGalley.tpl:<frameset rows="40,*" frameborder="0" framespacing="0" style="border: 0;">

The frameborder, framespacing attributes are not part of the XHTM1.0 standard for the <frameset> tag, but rather belong to the <frame> tag.
zharel
 
Posts: 29
Joined: Tue Oct 30, 2007 10:00 am
Location: Haifa, Israel

Re: markup validation of ojs pages

Postby asmecher » Wed Nov 07, 2007 9:28 am

Hi zharel,

Thanks -- try updating your CVS checkout, as I corrected this and number of other problems yesterday.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 2 guests