xhtml validation on printCustomSizedImage

Hello,

I'm using 1.1 and the printCustomSizedImage for the images in the theme. When I validate, I get this message and an invalid page:

cannot generate system identifier for general entity "i".

….php?a=residential%2Fprince-george-1&i=12.jpg&s=650" rel="lightbox[Residence]

Now, when I refresh the page a few times and click on all the images, then I get a valid page.

What's up with this?

Comments

  • bump
  • You don't have mod_rewrite set. These are the (perfectly legitimate) kinds of links that zenphoto uses when it is not allowed to create cruft-free URLs.
  • I do have mod rewrite on in the admin settings and the .htaccess is also working fine.
  • You will have, then, to upgrade to zenphoto 1.1.5.
  • The validation problem is in the URL. It should be:
    `....php?a=residential%2Fprince-george-1&i=12.jpg&s=650" rel="lightbox[Residence]`
    to validate correctly.

    ZenPhoto uses the non-validating "&" instead of "&" in a number of places. If it's a URL inside HTML, it should be "&". On my site I've already cleaned up the RSS feed links.
  • acrylian Administrator, Developer
    True...we will work on that (we probably don't notice it that clearly since we basically always use modrewrite).
  • Actually, the url is correct as it stands it is a 'query' url passing the parameters a, i, and s to the i.php script. Changing it to & may allow it to validate but it will not work within zenphoto.
  • No, that's wrong, it is not valid syntax, ampersands in query strings as part of in-page markup need to be escaped:
    http://validator.w3.org/docs/help.html#faq-ampersand
    http://htmlhelp.com/tools/validator/problems.html#amp
    The browser will correctly unescape it, so it should work fine.

    It's a very common error, but it will cause W3C validation to fail.
  • acrylian Administrator, Developer
    As do many hacks to get certain "unbrowsers" to show sites correctly. But generally you are of course right.
Sign In or Register to comment.