Merci Eric pour ton aide,
mais, sans doute n’ai-je pas tout compris, car si j’applique ta solution, non seulement ça ne fonctionne pas avec Google Console, mais si j’affiche le sitemap dans le navigateur, par https://mondomaine/sitemap.xml, j’ai l’erreur suivante qui s’affiche:
This page contains the following errors:error on line 36 at column 110: Namespace prefix xhtml on link is not defined error on line 44 at column 117: Namespace prefix xhtml on link is not defined error on line 52 at column 123: Namespace prefix xhtml on link is not defined error on line 60 at column 118: Namespace prefix xhtml on link is not defined error on line 140 at column 117: Namespace prefix xhtml on link is not defined error on line 148 at column 115: Namespace prefix xhtml on link is not defined error on line 156 at column 105: Namespace prefix xhtml on link is not defined error on line 164 at column 108: Namespace prefix xhtml on link is not defined error on line 172 at column 120: Namespace prefix xhtml on link is not defined
Below is a rendering of the page up to the first error.-------------------------
Voilà le code du squelettes/sitemap.xml.html:
#HTTP_HEADER{Content-Type: text/xml; charset=utf-8}
<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns:xsi=« http://www.w3.org/2001/XMLSchema-instance »
xsi:schemaLocation=« http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd »
xmlns=« http://www.sitemaps.org/schemas/sitemap/0.9 »>
[(#REM) Accueil]
#URL_SITE_SPIP/
hourly
[(#REM) Rubriques]
<BOUCLE_r(RUBRIQUES){!par date}{0,1000}{si #ENV{annee}|non}{!titre_mot=pas dans sitemap}>
[(#URL_RUBRIQUE|url_absolue)]
</BOUCLE_r>
[(#REM) Articles]
[(#SET{recent,[(#VAL{Y-m-d H:i:s}|date{#VAL{« -1 day »}|strtotime})]})]
<BOUCLE_a(ARTICLES){annee?}{!par date_modif}{!par date}{0,2000}{!titre_mot=pas dans sitemap}>
[(#URL_ARTICLE|url_absolue)]
<BOUCLE_a_trad(ARTICLES){traduction}>
<xhtml:link rel=« alternate » hreflang=« [(#LANG)] » href=« [(#URL_ARTICLE|url_absolue)] » />
</BOUCLE_a_trad>
[(#DATE_MODIF**|>{#GET{recent}}
|?{[(#DATE_MODIF**|date_iso)]})]
</BOUCLE_a>
[(#REM) Breves]
<BOUCLE_b(BREVES){annee?}{!par date}{0,1000}>[
(#URL_BREVE|url_absolue)]</BOUCLE_b>
[(#REM) Extensions de sitemap par des plugins]
<BOUCLE_objets(DATA){source table,#REM|lister_tables_objets_sql}{si #ENV{annee}|non}>
#SET{fond,#VAL{sitemap-}|concat{#VALEUR{table_objet}}}
[(#GET{fond}|trouver_fond|oui)#INCLURE*{fond=#GET{fond}}]
</BOUCLE_objets>
Merci d’avance,
Cordialement,
Hervé
Le 26 juil. 2018 à 18:54, eric <webmaster@opalesurfcasting.net> a écrit :
Bonjour,
J’ai une erreur de sitemap avec Google Search console.
J’ai indiqué à Google Search Console https://reussirensembleablr.fr/s
itemap.xml et il me renvoie une erreur :
« Le format de votre sitemap n’est pas accepté. Veuillez vous assurer
qu’il est conforme à nos Consignes relatives aux sitemaps, puis
renvoyez-le. »
Mon fichier squelettes/sitemap.xml.html est pourtant une copie non
modifiée de squelettes-dist/sitemap.xml.html
Une idée ?
Idem, SPIP 3.2.1, pas de soucis avec le sitemap.
Essaie avec cela :
<urlset xmlns="[http://www.sitemaps.org/schemas/sitemap/0.9](http://www.sitemaps.org/schemas/sitemap/0.9)"
xmlns:xsi="[http://www.w3.org/2001/XMLSchema-instance](http://www.w3.org/2001/XMLSchema-instance)"
xsi:schemaLocation="[http://www.sitemaps.org/schemas/sitemap/0.9](http://www.sitemaps.org/schemas/sitemap/0.9)
[http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd](http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd)">
Il manque la seconde ligne : xmlns:xsi=« http://www.w3.org/2001/XMLSch
ema-instance »
C’est la seule différence trouvée pour le moment avec ton sitemap.
Cordialement,
Eric
liste spip
spip@rezo.net - désabonnement : envoyer un mail à spip-off@rezo.net
Archives : https://www.mail-archive.com/spip@rezo.net/maillist.html
Infos : http://listes.rezo.net/mailman/listinfo/spip
Documentation de SPIP : http://www.spip.net/
Irc : de l’aide à toute heure : http://spip.net/irc