Validazione codice
In http://www.nadiaciao.it ho inserito il modulo contatti e funziona, ma il codice XHTML 1.0 Transitional non viene validato dal W3C.
Purtroppo non conosco il codice PHP e non so dove metter mano.
Per favore mi potete aiutare?
Inserisco il risultato della validazione.
Grazie.
Error Line 116, column 16: there is no attribute "wrap" .
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).
This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.
How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute.
?
Warning Line 116, column 326: cannot generate system identifier for general entity "textarea" .
... add images" href="?q=img_assist/add&textarea=edit[form_field_body]" onclick=
An entity reference was found in the document, but there is no reference by that name defined. Often this is caused by misspelling the reference name, unencoded ampersands, or by leaving off the trailing semicolon (;). The most common cause of this error is unencoded ampersands in URLs as described by the WDG in "Ampersands in URLs".
Entity references start with an ampersand (&) and end with a semicolon (;). If you want to use a literal ampersand in your document you must encode it as "&" (even inside URLs!). Be careful to end entity references with a semicolon or your entity reference may get interpreted in connection with the following text. Also keep in mind that named entity references are case-sensitive; &Aelig; and æ are different characters.
If this error appears in some markup generated by PHP's session handling code, this article has explanations and solutions to your problem.
Note that in most documents, errors related to entity references will trigger up to 5 separate messages from the Validator. Usually these will all disappear when the original problem is fixed.
?
Error Line 116, column 326: general entity "textarea" not defined and no default entity .
... add images" href="?q=img_assist/add&textarea=edit[form_field_body]" onclick=
This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details.
?
Warning Line 116, column 334: reference not terminated by REFC delimiter .
...ges" href="?q=img_assist/add&textarea=edit[form_field_body]" onclick="window.
If you meant to include an entity that starts with "&", then you should terminate it with ";". Another reason for this error message is that you inadvertently created an entity by failing to escape an "&" character just before this text.
?
Warning Line 116, column 334: reference to external entity in attribute value .
...ges" href="?q=img_assist/add&textarea=edit[form_field_body]" onclick="window.
This is generally the sign of an ampersand that was not properly escaped for inclusion in an attribute, in a href for example. You will need to escape all instances of '&' into '&'.
?
Error Line 116, column 334: reference to entity "textarea" for which no system identifier could be generated .
...ges" href="?q=img_assist/add&textarea=edit[form_field_body]" onclick="window.
This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details.
?
Info Line 116, column 325: entity was defined here .
...o add images" href="?q=img_assist/add&textarea=edit[form_field_body]" onclick
Error Line 116, column 556: required attribute "alt" not specified .
...d-image.jpg" width="36" height="25" />
The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.
Typical values for type are type="text/css" for
and type="text/javascript" for . l
Risposte
Il primo errore è dovuto
Il primo errore è dovuto alla presenza dell'attributo wrap="virtual" nella textarea, non accettato dall'XHTML. È messo da Drupal 4.6 nella funzione form_textarea() del file common.inc: puoi editare quel file e togliere l'attributo maligno, oppure aggiornare Drupal alla versione 4.7.
Gli altri errori sono tutti "amputabili" al bottone "Aggiungi immagini" del modulo img_assist, che sputa fuori un codice non validato a causa delle & presenti nella funzione di apertura del popup. Se si sostituissero le & con il codice & e si aggiungesse l'attributo alt all'immagine, sarebbe validato.