From 08deb3c0e9a721e81858597ee8716764476f1674 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 18 Apr 2021 14:41:05 +0200 Subject: [PATCH] Fix selection of files to report into sitemap --- htdocs/website/index.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 0385c4d7c57..10f6dc8c041 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2263,6 +2263,7 @@ if ($action == 'generatesitemaps' && $usercanedit) { $sql .= " FROM ".MAIN_DB_PREFIX."website_page as wp, ".MAIN_DB_PREFIX."website as w"; $sql .= " WHERE wp.type_container IN ('page', 'blogpost')"; $sql .= " AND wp.fk_website = w.rowid"; + $sql .= " AND status = ".WebsitePage::STATUS_VALIDATED; $sql .= " AND wp.pageurl NOT IN ('404', '500', '501', '503')"; $sql .= " AND w.ref = '".dol_escape_json($websitekey)."'"; $resql = $db->query($sql);