GuppY, the benchmark database free CMS

telecharger01.png


You are here :   Welcome » Forum » GuppY 6 » Sitemaps en xml
    Print this page...

Warning: GuppY 6.00.18

GuppY release 6.00.18 : pack, cumulative and non-cumulative patch

To upgrade from 6.00.17 to 6.00.18, you apply the non-cumulative GuppY 6.00.18 patch.

To upgrade from version 5.03.03 to version 6.00.18, you must follow the migration procedure described in this article.


For plugins and skins, please post on the author's website.

The skins and plugins of our friend Saxbar are available for download on this site.


 

Forum - GuppY 6 - Sitemaps en xml


Connected : (nobody)

  Topic # 131238
13/02/2021 @ 13:33
by linuxmr
Administrator
visitor

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

  

Answer n° 1
--------
13/02/2021 @ 14:55
by 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.

  
Answer n° 2
--------
13/02/2021 @ 18:35
by linuxmr
Administrator
visitor

Re,

Oui, monsieur, et surtout avant de poster

a+

  
Answer n° 3
--------
14/02/2021 @ 16:47
by linuxmr
Administrator
visitor

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+

  
Answer n° 4
--------
14/02/2021 @ 18:36
by 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.

  
Answer n° 5
--------
14/02/2021 @ 19:58
by linuxmr
Administrator
visitor

Bonsoir,

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

Bonne soirée

  
topic active   topic closed   Important!   New  
Correct message   Close topic   Make sticky topic