Pergunta

I had a PHP/prestashop (1.5.0.17) application that was running well and suddenly, when my hosting provider changed (maybe he changed some server php options), I started to get the following error:

This page contains the following errors:
error on line 636 at column 127: Specification mandate value for attribute gagarin
Below is a rendering of the page up to the first error.

and this is line 636:

<p class="product_desc"><a href="http://modele-ad9bis.pl/lokomotywy-h0/546-br-120-dr-piko.html" title="Lokomotywa spalinowa typu BR 120 zarządu kolei wschodnioniemieckich DR produkcji PIKO- kultowy " gagarin".">Lokomotywa spalinowa typu BR 120 zarządu kolei wschodnioniemieckich DR produkcji PIKO- kultowy "gagarin".</a></p>

So he complains about " sign inside p tag? I don't understand. Does it have something to do with the HTML document definition? THis is the header of the document:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl">

This looks like XML parsing error when the browser cannot parse, but it's inside HTML document...

Of course, for different pages there are different errors with different lines. It just started to complain suddenly - and I don't know if the PHP server options changed or something with the browsers (one day all browsers started to validate entire XML?). I'm 100% percent sure I didn't change anything in code and I'm sure that for last few months the shop worked well and browsers didn't display anything like this. Can someone give any hint what is wrong here and how can I fix this?


To sum up - these are my questions:

  1. what can I do to fix this ugly error that stops rendering?
  2. What happened - what is the cause?
Foi útil?

Solução

Your page is certainly sent as "application/xhtml+xml" instead of "text/html".

In this case, you browser check the xml syntax of your HTML and display those errors.

If your provider didn't change the mime type in the config, maybe the mod_pagespeed was installed. This module send content as "application/xhtml+xml".

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top