[TYPO3-UG Italy] metatag e xhtml_cleaning

Roberto Torresani erreti at siel.it
Wed Dec 15 13:12:53 CET 2010


Ciao Alessandro!
scusa se sono ripetitivo, hai provato ad aggiungere la riga che ti ho
indicato io?
Su un mio TYPO3 versione 4.4.4 ho i seguenti due comportamenti

################# SITUAZIONE 1 #################
*** SETUP del template:
page.config.doctype = <?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE
html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
page.config.htmlTag_setParams = lang="it" xml:lang="it" xmlns="
http://www.w3.org/1999/xhtml"
page = PAGE
page.10 = TEXT
page.10.value = HELLO WORLD!

*** Risultato HTML

<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html lang="it" xml:lang="it" xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!--
	This website is powered by TYPO3 - inspiring people to share!
	TYPO3 is a free open source Content Management Framework initially
created by Kasper Skaarhoj and licensed under GNU/GPL.

	TYPO3 is copyright 1998-2010 of Kasper Skaarhoj. Extensions are
copyright of their respective owners.
	Information and contribution at http://typo3.com/ and http://typo3.org/

-->
<title>verifica</title>
<meta name="generator" content="TYPO3 4.4 CMS">

<script src="typo3temp/javascript_93077bb238.js?1290687175
<view-source:http://77.72.193.240/test/typo3temp/javascript_93077bb238.js?1290687175>"
type="text/javascript"></script>

</head>
<body>
HELLO WORLD!
</body>
</html>

*** W3C: Errori presenti


################# SITUAZIONE 2 #################
*** SETUP del template:
page.config.doctype = <?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE
html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
page.config.htmlTag_setParams = lang="it" xml:lang="it" xmlns="
http://www.w3.org/1999/xhtml"
page.config.xhtml_cleaning = all
page = PAGE
page.10 = TEXT
page.10.value = HELLO WORLD!

*** Risultato HTML

<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html lang="it" xml:lang="it" xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!--
	This website is powered by TYPO3 - inspiring people to share!
	TYPO3 is a free open source Content Management Framework initially
created by Kasper Skaarhoj and licensed under GNU/GPL.

	TYPO3 is copyright 1998-2010 of Kasper Skaarhoj. Extensions are
copyright of their respective owners.
	Information and contribution at http://typo3.com/ and http://typo3.org/

-->
<title>verifica</title>
<meta name="generator" content="TYPO3 4.4 CMS" />

<script src="typo3temp/javascript_93077bb238.js?1290687175
<view-source:http://77.72.193.240/test/typo3temp/javascript_93077bb238.js?1290687175>"
type="text/javascript"></script>

</head>
<body>
HELLO WORLD!
</body>
</html>

*** W3C: Nessun errore presente

L'unica differenza tra i due setup è la riga di typoscript
page.config.xhtml_cleaning = all
Forse non sto capendo il tuo problema?

Ciao
Roberto


Il giorno 15 dicembre 2010 12:31, Alessandro Tuveri <at at uniud.it> ha
scritto:

> Ciao
> e grazie
> il fenomeno e' riproducibile; ora spiego:
>
> se riporto la situazione nel mio sito a livello precedente quindi uso:
>
>
> page.config.doctype = <?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE
> html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> page.config.htmlTag_setParams = lang="it" xml:lang="it" xmlns="
> http://www.w3.org/1999/xhtml"
>
> e poi piu' sotto ripulisco il codice con:
>
>
> page.stdWrap.HTMLparser.xhtml_cleaning = all
>
> accade il problema segnalato: meta tag non in xhtml, meta indesiderati
> aggiunti obbligatoriamente, tag link a foglio di stile dinamico generato da
> TYPO3, tutto NON ripulito ne' quindi compatibile con le specifiche...
>
> se uso
>
>
> page.config.doctype = xhtml_trans
> page.stdWrap.HTMLparser.xhtml_cleaning = all
>
> e' tutto ok, sembra quindi che all o meno non abbia influenza alcuna....
>
> thanx
>
>
>
> http://www.specialistaweb.it/typo3/backend.php
>
>
> Quoting Roberto Torresani <erreti at siel.it>:
>
>  Ciao Alessandro!
>> Io avevo provato ad aggiungere la tua dichiarazione e anche con la
>> versione
>> 4.4.x mi funzionava correttamente la gestione dei tag e relative chiusure.
>> Hai provato ad inserire la riga:
>> page.config.xhtml_cleaning      = all
>> Nella tua mail parli solo della page.stdWrap.xhmtl_cleaning
>>
>> Ciao
>> Roberto
>>
>>
>> Il giorno 15 dicembre 2010 09:52, Alessandro Tuveri <at at uniud.it> ha
>> scritto:
>>
>>  Trovata la soluzione, spiego.
>>>
>>> Secondo me si tratta di un BUG di CMS TYPO3, qui illustro per chi vuol
>>> fare
>>> prove.
>>>
>>> Ricordo che nei tempi "antichi" avevo usato questa sintassi per definire
>>> il
>>> doctype:
>>>
>>>
>>> //setup XHTML Transitional 1.0
>>> page.config.doctype = <?xml version="1.0"
>>> encoding="iso-8859-1"?><!DOCTYPE
>>> html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
>>> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>>>
>>> page.config.htmlTag_setParams = lang="it" xml:lang="it" xmlns="
>>> http://www.w3.org/1999/xhtml"
>>>
>>> tutto ha funzionato fino alla v. 4.2.15, ma dalla versione 4.x come
>>> sospettavo
>>> è necessario usare questa sintassi in luogo della precedente:
>>>
>>> page.config.doctype = xhtml_trans
>>> page.config.frameObj = _top
>>>
>>> se viene usata la dichiarazione diretta del doctype, vista sopra per la
>>> v.4.2.15 accade questo:
>>>
>>> TYPO3 CMS aggiunge i metatag seguenti OBBLIGATORI:
>>>
>>> * immediatamente * dopo il tag di apertura <head>:
>>> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" >
>>> (o con il valore uft-8)
>>>
>>> e piu' sotto:
>>>
>>>
>>> <meta name="generator" content="TYPO3 4.4 CMS" >
>>>
>>> di per se' questo e' un comportamento anomalo, in quanto il designer
>>> potrebbe non voler dichiarare per questioni di sicurezza la versione del
>>> CMS
>>> (cosi' facevo io prima). Bene aggiunti i tag in questione non c'e' verso
>>> di
>>> ripulirli tramite page.stdWrap.xhmtl_cleaning , infatti evidentemente
>>> vengono aggiunti DOPO IL CLEANING o vengono ignorati
>>>
>>> Non bastasse questo i tag in questione non e' possile eliminarli con:
>>>
>>> page.meta >
>>>
>>> Infine, accade che il tag che punta al foglio di stile css dinamico (?)
>>> non
>>> viene convertito in xhtml Trans e resta cosi':
>>>
>>> <link rel="stylesheet" type="text/css"
>>> href="typo3temp/stylesheet_5fb9660818.css?1292069027" media="all" >
>>>
>>> conseguenza: validator.w3.org segnala almeno una quindicina di errori.
>>>
>>> Vi chiederete perche' e' stata preferita la sintassi precedente, ovvero
>>> la
>>> dichiarazione diretta del doctype; gia' da tempo l'altra generava dei
>>> problemi di compatibilita'.
>>>
>>> Bene ora la soluzione c'e',evidentemente TYPO3 dalla versione 4.4.4 si
>>> comporta diversamente e aggiunte in tag in questione (non "ripulibili")
>>> basandosi sul doctype dichiarato, a questo va contro la liberta' di
>>> dichiararne uno autonomamente...
>>>
>>> saluti a tutti e auguri!
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Quoting Roberto Torresani <erreti at siel.it>:
>>>
>>>  Ciao Alessandro!
>>>
>>>> quali sono le configurazioni di  typoscript che utilizzi per
>>>> personalizzare
>>>> l'header della pagina? Potrebbe essere qualcosa da integrare in questa
>>>> parte
>>>> per risolvere il tuo problema.
>>>>
>>>> Ciao
>>>> Roberto
>>>>
>>>>
>>>> Il giorno 06 dicembre 2010 16:01, Alessandro Tuveri <at at uniud.it> ha
>>>> scritto:
>>>>
>>>>  Salve a tutti
>>>>
>>>>> da qualche giorno e dopo aver aggiornato correttamente vari siti dalla
>>>>> v.4.2.15 alla v. 4.4.4 ho notato che, pur attivando la pulizia xhtml
>>>>> per
>>>>> il
>>>>> rendering compatibile con xhtml Transitional 1.0
>>>>> i tag generati automaticamente da TYPO3, ovvero:
>>>>>
>>>>> tutti i META TAG
>>>>> (io li genero con: page.meta.NOME_DEL_TAG = <valore>)
>>>>>
>>>>> e altri tag situati nella header, come:
>>>>> <link rel="stylesheet" type="text/css"
>>>>> href="typo3temp/stylesheet_fa0cd332a5.css?1291300775" media="all">
>>>>>
>>>>> non vegono sottoposti alla pulizia, in pratica il test di
>>>>> compatibilita'
>>>>> non e' superato il quanto il tag non e' chiuso correttamente con " /> "
>>>>>
>>>>> ora: mentre il problema puo' essere superato per i meta tag (e'
>>>>> sufficiente
>>>>> aggirare TYPO3 usando piu' proprieta' del tipo:
>>>>>
>>>>> page.headerData.10 = TEXT
>>>>> page.headerData.10.data (... eccetera...)
>>>>>
>>>>> TYPO3 aggiunge comunque il tag meta per la versione e il charset:
>>>>> <meta name="generator" content="TYPO3 4.4 CMS">
>>>>> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
>>>>>
>>>>> come si vede sopra NON nel formato corretto per XHTML.
>>>>>
>>>>> quindi: alla fine del giro comunque 5-6 errori di compatibilita'
>>>>> accadono
>>>>> comunque a causa di queste "trovate" di TYPO3; nelle precedenti
>>>>> versioni
>>>>> non
>>>>> avevo alcun problema.
>>>>>
>>>>> qualcuno sa qualcosa o ha idee?
>>>>>
>>>>> grazie in anticipo
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Quoting Maurizio Morini <morini at gammsystem.com>:
>>>>>
>>>>>  Tieni conto che nella seconda skin devi azzerare le configurazioni TS
>>>>>
>>>>>  preCodeHeader >
>>>>>> header >
>>>>>> postCodeHeader >
>>>>>>
>>>>>> in modo che non si sovrappongano
>>>>>>
>>>>>> ciao M
>>>>>>
>>>>>> Il 03/12/2010 16.39, Nicola Cerchiari ha scritto:
>>>>>>
>>>>>>  Grandissimo aiuto davvero.
>>>>>>
>>>>>>> La necessità di due skin su due sotto alberi nasce dal fatto che ad
>>>>>>> esempio
>>>>>>> un sito contiene due versioni (anno dopo anno) che vengono
>>>>>>> completamente
>>>>>>> riviste dal punto di vista grafico ed editoriale e devono comunque
>>>>>>> coesistere.
>>>>>>> Comunque farò delle prove con il tuo prezioso suggerimento e ti farò
>>>>>>> sapere.
>>>>>>>
>>>>>>> Grazie,
>>>>>>> Nicola
>>>>>>>
>>>>>>> Il giorno 03 dicembre 2010 16:33, Maurizio Morini<
>>>>>>> morini at gammsystem.com>
>>>>>>>  ha
>>>>>>> scritto:
>>>>>>>
>>>>>>>  Ciao Nicola,
>>>>>>>
>>>>>>>  ti riporto la risposta di Ron Hall di TemplavoilaFrameWork alla tua
>>>>>>>> domanda.
>>>>>>>>
>>>>>>>> *******************
>>>>>>>> The Framework skin selector has to be on a root level of the site so
>>>>>>>> does
>>>>>>>> not really fit the situation you describe.However, a couple of
>>>>>>>> thoughts
>>>>>>>> on
>>>>>>>> that.
>>>>>>>>
>>>>>>>> 1) I question whether that would be needed. After all you would
>>>>>>>> normally
>>>>>>>> either use different templates in the same skin for that section of
>>>>>>>> the
>>>>>>>> site
>>>>>>>> or else rewrite your TS objects thus overriding the original objects
>>>>>>>> for
>>>>>>>> that section of the site
>>>>>>>>
>>>>>>>> 2) If you really did have to do a new skin then you could probably
>>>>>>>> manually
>>>>>>>> unset and then reset paths for things like the CSS, JS, TS etc.
>>>>>>>>
>>>>>>>> At some point we may have it so that skins could be changed with TS
>>>>>>>> for
>>>>>>>> things like a mobile site but it would still be on the root
>>>>>>>> template.
>>>>>>>> *******************
>>>>>>>>
>>>>>>>>
>>>>>>>> Ho fatto una prova veloce che consiste:
>>>>>>>> 1) settare una skin nello skin selector (ad esepio wireframe)
>>>>>>>> 2) definire un ext template per una pagina interna specificando
>>>>>>>> nelle
>>>>>>>> costants
>>>>>>>>
>>>>>>>> <INCLUDE_TYPOSCRIPT: source="FILE:
>>>>>>>> typo3conf/ext/skin_regal/typoscript/skin_constants.ts">
>>>>>>>> bnTemplates.skinPath = typo3conf/ext/skin_regal/
>>>>>>>> templavoila_framework.skinPath = typo3conf/ext/skin_regal/
>>>>>>>>
>>>>>>>> nel setup:
>>>>>>>> <INCLUDE_TYPOSCRIPT: source="FILE:
>>>>>>>> typo3conf/ext/skin_regal/typoscript/skin_typoscript.ts">
>>>>>>>>
>>>>>>>>
>>>>>>>> Come vedi ho ridefinito la skin wireframe con la skin regal
>>>>>>>> e la cosa sembra funzionare...
>>>>>>>>
>>>>>>>> Spero di essere stato d'aiuto.
>>>>>>>> ciao M
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Morini Maurizio
>>>>>>>> Gamm System Srl
>>>>>>>> www.gammsystem.com
>>>>>>>> morini at gammsystem.com
>>>>>>>>
>>>>>>>>
>>>>>>>> Il 01/12/2010 14.04, Nicola Cerchiari ha scritto:
>>>>>>>>
>>>>>>>>  Salve a tutti,
>>>>>>>>
>>>>>>>>
>>>>>>>>> vorrei porre domanda che mi è venuta in mente testando l'estensione
>>>>>>>>> "templavoila framework" presentata al T3Camp Italia (tanto per
>>>>>>>>> citare
>>>>>>>>> le
>>>>>>>>> fonti ;) ).
>>>>>>>>> E' effettivamente molto comoda ed intuitiva, come aveva già ben
>>>>>>>>> dimostrato
>>>>>>>>> Maurizio (perdonami se per caso sbaglio nome), ma per poterla
>>>>>>>>> introdurre
>>>>>>>>> nel
>>>>>>>>> nostro flusso di lavoro viste le nostre esigenze, mi chiedevo se
>>>>>>>>> fosse
>>>>>>>>> possibile poter specificare skin diverse a livello di sotto-alberi
>>>>>>>>> di
>>>>>>>>> un
>>>>>>>>> sito.
>>>>>>>>> Ho notato che se creo un template ext+ in un sotto-albero il tab
>>>>>>>>> "skin
>>>>>>>>> selector" non compare, quindi temo non si possa fare, però qualcuno
>>>>>>>>> sa
>>>>>>>>> se
>>>>>>>>> è
>>>>>>>>> per caso è possibile in qualche altro modo?
>>>>>>>>>
>>>>>>>>> Grazie ancora a tutti,
>>>>>>>>> Nicola
>>>>>>>>>
>>>>>>>>>  _______________________________________________
>>>>>>>>>
>>>>>>>>>  TYPO3-UG-Italy mailing list
>>>>>>>> TYPO3-UG-Italy at lists.typo3.org
>>>>>>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-ug-italy
>>>>>>>>
>>>>>>>>  _______________________________________________
>>>>>>>>
>>>>>>>>  TYPO3-UG-Italy mailing list
>>>>>>>
>>>>>> TYPO3-UG-Italy at lists.typo3.org
>>>>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-ug-italy
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> ALESSANDRO TUVERI
>>>>>
>>>>> --------------------------------------
>>>>> SERVIZI WEB D'ATENEO
>>>>> CSIT, Centro Servizi Informatici e Telematici
>>>>> Università degli Studi di Udine
>>>>> tel. ufficio 0432-558904
>>>>> --------------------------------------
>>>>> Homo sine pecunia est imago mortis
>>>>> --------------------------------------
>>>>>
>>>>> ----------------------------------------------------------------------
>>>>> SEMEL (SErvizio di Messaging ELettronico) - CSIT -Universita' di Udine
>>>>>
>>>>> _______________________________________________
>>>>> TYPO3-UG-Italy mailing list
>>>>> TYPO3-UG-Italy at lists.typo3.org
>>>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-ug-italy
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> 27 novembre 2010, Bologna, T3Camp Italia: Typoscript, questo
>>>> sconosciuto<
>>>>
>>>> http://www.t3campitalia.it/programma-talk-conferenza-typo3/typoscript-questo-sconosiuto.html
>>>> >
>>>> _______________________________________________
>>>> TYPO3-UG-Italy mailing list
>>>> TYPO3-UG-Italy at lists.typo3.org
>>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-ug-italy
>>>>
>>>>
>>>>
>>>
>>> ALESSANDRO TUVERI
>>>
>>> --------------------------------------
>>> SERVIZI WEB D'ATENEO
>>> CSIT, Centro Servizi Informatici e Telematici
>>> Università degli Studi di Udine
>>> tel. ufficio 0432-558904
>>> --------------------------------------
>>> Homo sine pecunia est imago mortis
>>> --------------------------------------
>>>
>>> ----------------------------------------------------------------------
>>> SEMEL (SErvizio di Messaging ELettronico) - CSIT -Universita' di Udine
>>>
>>> _______________________________________________
>>> TYPO3-UG-Italy mailing list
>>> TYPO3-UG-Italy at lists.typo3.org
>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-ug-italy
>>>
>>>
>>
>>
>> --
>> 27 novembre 2010, Bologna, T3Camp Italia: Typoscript, questo
>> sconosciuto<
>> http://www.t3campitalia.it/programma-talk-conferenza-typo3/typoscript-questo-sconosiuto.html
>> >
>> _______________________________________________
>> TYPO3-UG-Italy mailing list
>> TYPO3-UG-Italy at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-ug-italy
>>
>>
>
>
> ALESSANDRO TUVERI
>
> --------------------------------------
> SERVIZI WEB D'ATENEO
> CSIT, Centro Servizi Informatici e Telematici
> Università degli Studi di Udine
> tel. ufficio 0432-558904
> --------------------------------------
> Homo sine pecunia est imago mortis
> --------------------------------------
>
> ----------------------------------------------------------------------
> SEMEL (SErvizio di Messaging ELettronico) - CSIT -Universita' di Udine
>
> _______________________________________________
> TYPO3-UG-Italy mailing list
> TYPO3-UG-Italy at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-ug-italy
>



-- 
27 novembre 2010, Bologna, T3Camp Italia: Typoscript, questo
sconosciuto<http://www.t3campitalia.it/programma-talk-conferenza-typo3/typoscript-questo-sconosiuto.html>


More information about the TYPO3-UG-Italy mailing list