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
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

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 16 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: 8851
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: 8851
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 8 guests