diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 61a62fbf8df..fe37cb68418 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2353,7 +2353,8 @@ if ($action == 'generatesitemaps' && $usercanedit) { } // Add "has translation pages" - $sql = 'SELECT rowid as id, lang, pageurl from '.MAIN_DB_PREFIX.'website_page where fk_page IN ('.$db->sanitize($objp->rowid.($translationof ? ', '.$translationof : '')).")"; + $sql = 'SELECT rowid as id, lang, pageurl from '.MAIN_DB_PREFIX.'website_page'; + $sql .= ' WHERE status = '.WebsitePage::STATUS_VALIDATED.' AND fk_page IN ('.$db->sanitize($objp->rowid.($translationof ? ', '.$translationof : '')).")"; $resqlhastrans = $db->query($sql); if ($resqlhastrans) { $num_rows_hastrans = $db->num_rows($resqlhastrans);