GuppY, le CMS de référence sans base de données

telecharger.png


Vous êtes ici :   Accueil » Forum » GuppY 6 » Sitemaps en xml
    Imprimer la page...

Attention : GuppY 6.00.18

Sortie de GuppY 6.00.18 : pack et patch cumulatif et non-cumulatif

Pour passer de la  6.00.17 à la version 6.00.18 vous appliquez le patch non-cumulatif GuppY 6.00.18 .

Pour passer de la version 5.03.03 à la version 6.00.18, vous devez impérativement suivre la procédure de migration décrite dans cet article.

Pour les plugins et pour les skins, merci de poster sur le site de leur auteur.

Les skins et les plugins de notre ami Saxbar sont en téléchargement sur ce site.

 

Forum - GuppY 6 - Sitemaps en xml


Connectés :

  Sujet n° 131238
le 13/02/2021 @ 13:33
par linuxmr
Administrateur
visiteur

Bonjour,

il me semble qu'il y a une erreur lors de la génération de sitemaps.xml. la balise donne lien pour les fichiers articles, faq .. en .xml

Le lien vers le fichier est amputé de 3 caractères ce qui génèrent par exemple

  <sitemap>
    <loc>https://www.nomdedomaine.info/rt.xml</loc>
    <lastmod>2021-01-26</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://www.nomdedomaine.info/ews.xml</loc>
    <lastmod>2021-01-26</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://www.nomdedomaine.info/hoto.xml</loc>
    <lastmod>2021-01-26</lastmod>
  </sitemap>

Provoquant une erreur 403

la partie qui génère est functions.php

		if (file_exists(SM_URLS))    $dbws[] = array('LOC'=>substr(SM_URLS, 3), 'LM'=>date('Y-m-d', filemtime(SM_URLS)));
		if (file_exists(SM_BLOG))    $dbws[] = array('LOC'=>substr(SM_BLOG, 3), 'LM'=>date('Y-m-d', filemtime(SM_BLOG)));
		if (file_exists(SM_ART))     $dbws[] = array('LOC'=>substr(SM_ART, 3), 'LM'=>date('Y-m-d', filemtime(SM_ART)));
		if (file_exists(SM_NEWS))    $dbws[] = array('LOC'=>substr(SM_NEWS, 3), 'LM'=>date('Y-m-d', filemtime(SM_NEWS)));
		if (file_exists(SM_PHOTO))   $dbws[] = array('LOC'=>substr(SM_PHOTO, 3), 'LM'=>date('Y-m-d', filemtime(SM_PHOTO)));
		if (file_exists(SM_DNLOAD))  $dbws[] = array('LOC'=>substr(SM_DNLOAD, 3), 'LM'=>date('Y-m-d', filemtime(SM_DNLOAD)));
		if (file_exists(SM_FAQ))     $dbws[] = array('LOC'=>substr(SM_FAQ, 3), 'LM'=>date('Y-m-d', filemtime(SM_FAQ)));
		if (file_exists(SM_LINKS))   $dbws[] = array('LOC'=>substr(SM_LINKS, 3), 'LM'=>date('Y-m-d', filemtime(SM_LINKS)));
		if (file_exists(SM_GUESTBK)) $dbws[] = array('LOC'=>substr(SM_GUESTBK, 3), 'LM'=>date('Y-m-d', filemtime(SM_GUESTBK)));
		if (file_exists(SM_FORUM))   $dbws[] = array('LOC'=>substr(SM_FORUM, 3), 'LM'=>date('Y-m-d', filemtime(SM_FORUM)));
		if (file_exists(SM_AGENDA))  $dbws[] = array('LOC'=>substr(SM_AGENDA, 3), 'LM'=>date('Y-m-d', filemtime(SM_AGENDA)));

Bonne journée

  

Réponse n° 1
--------
le 13/02/2021 @ 14:55
par Saxbar
Saxbar

Bonjour,

J'utilise sur mes sites la génération des sitemaps et je ne constate pas ce problème.

Les noms des fichiers xml à générer sont dans des constantes stockées dans le fichier constantes.php, vérifie donc si cela est conforme aux définitions ci-dessous :

define('SITEMAPS',        CHEMIN.'sitemaps.xml');
define('SM_BLOG',         CHEMIN.'smblog.xml');
define('SM_ART',          CHEMIN.'smart.xml');
define('SM_NEWS',         CHEMIN.'smnews.xml');
define('SM_PHOTO',        CHEMIN.'smphoto.xml');
define('SM_DNLOAD',       CHEMIN.'smdnload.xml');
define('SM_FAQ',          CHEMIN.'smfaq.xml');
define('SM_LINKS',        CHEMIN.'smlinks.xml');
define('SM_GUESTBK',      CHEMIN.'smguestbk.xml');
define('SM_FORUM',        CHEMIN.'smforum.xml');
define('SM_AGENDA',       CHEMIN.'smagenda.xml');
define('SM_URLS',         CHEMIN.'smurls.xml');

Amicalement, Saxbar.

  
Réponse n° 2
--------
le 13/02/2021 @ 18:35
par linuxmr
Administrateur
visiteur

Re,

Oui, monsieur, et surtout avant de poster

a+

  
Réponse n° 3
--------
le 14/02/2021 @ 16:47
par linuxmr
Administrateur
visiteur

Bonjour,

je redonne le contenu du fichier sitemaps.xml

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://www.nomdedomaine.info/rls.xml</loc>
    <lastmod>2021-02-05</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://www.nomdedomaine.info/log.xml</loc>
    <lastmod>2021-01-26</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://www.nomdedomaine.info/rt.xml</loc>
    <lastmod>2021-01-26</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://www.nomdedomaine.info/ews.xml</loc>
    <lastmod>2021-01-26</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://www.nomdedomaine.info/hoto.xml</loc>
    <lastmod>2021-01-26</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://www.nomdedomaine.info/nload.xml</loc>
    <lastmod>2021-02-02</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://www.nomdedomaine.info/aq.xml</loc>
    <lastmod>2021-01-26</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://www.nomdedomaine.info/inks.xml</loc>
    <lastmod>2021-01-26</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://www.nomdedomaine.info/uestbk.xml</loc>
    <lastmod>2021-01-30</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://www.nomdedomaine.info/orum.xml</loc>
    <lastmod>2021-02-05</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://www.nomdedomaine.info/genda.xml</loc>
    <lastmod>2021-01-26</lastmod>
  </sitemap>
</sitemapindex>

le nomdedomaine remplace le vrai nom de domaine

Je précise que je n'ai pas personnalisé ni modifié

A+

  
Réponse n° 4
--------
le 14/02/2021 @ 18:36
par Saxbar
Saxbar

Bonjour,

Je viens d'apporter une modif car je ne me souvenais plus que la mise à jour des sitemaps se faisait en admin et à la racine, donc pas avec le même chemin, donc la valeur 3 utilisée n'est pas correcte.

Pour que tu puisses vérifier sans attendre le prochain patch, voici la modif :

$len = strlen(CHEMIN);
if (file_exists(SM_URLS))    $dbws[] = array('LOC'=>substr(SM_URLS, $len), 'LM'=>date('Y-m-d', filemtime(SM_URLS)));
if (file_exists(SM_BLOG))    $dbws[] = array('LOC'=>substr(SM_BLOG, $len), 'LM'=>date('Y-m-d', filemtime(SM_BLOG)));
if (file_exists(SM_ART))     $dbws[] = array('LOC'=>substr(SM_ART, $len), 'LM'=>date('Y-m-d', filemtime(SM_ART)));
if (file_exists(SM_NEWS))    $dbws[] = array('LOC'=>substr(SM_NEWS, $len), 'LM'=>date('Y-m-d', filemtime(SM_NEWS)));
if (file_exists(SM_PHOTO))   $dbws[] = array('LOC'=>substr(SM_PHOTO, $len), 'LM'=>date('Y-m-d', filemtime(SM_PHOTO)));
if (file_exists(SM_DNLOAD))  $dbws[] = array('LOC'=>substr(SM_DNLOAD, $len), 'LM'=>date('Y-m-d', filemtime(SM_DNLOAD)));
if (file_exists(SM_FAQ))     $dbws[] = array('LOC'=>substr(SM_FAQ, $len), 'LM'=>date('Y-m-d', filemtime(SM_FAQ)));
if (file_exists(SM_LINKS))   $dbws[] = array('LOC'=>substr(SM_LINKS, $len), 'LM'=>date('Y-m-d', filemtime(SM_LINKS)));
if (file_exists(SM_GUESTBK)) $dbws[] = array('LOC'=>substr(SM_GUESTBK, $len), 'LM'=>date('Y-m-d', filemtime(SM_GUESTBK)));
if (file_exists(SM_FORUM))   $dbws[] = array('LOC'=>substr(SM_FORUM, $len), 'LM'=>date('Y-m-d', filemtime(SM_FORUM)));
if (file_exists(SM_AGENDA))  $dbws[] = array('LOC'=>substr(SM_AGENDA, $len), 'LM'=>date('Y-m-d', filemtime(SM_AGENDA)));

Amicalement, Saxbar.

  
Réponse n° 5
--------
le 14/02/2021 @ 19:58
par linuxmr
Administrateur
visiteur

Bonsoir,

ok, un grand merci je vais tester cela avant mon hospitalisation dans deux jours

Bonne soirée

  
sujet actif   sujet clos   Important!   Nouveau  
Rectifier message   Clôturer sujet   Remonter sujet