Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
There is a little bug. The module contains the following code:
function _xmlsitemap_user_frontpage() {
static $uid;
if (!isset($uid)) {
$uid = 0;
$frontpage = explode('/', drupal_get_normal_path(variable_get('site_frontpage', 'node')));
if (count($frontpage == 2) && $frontpage[0] == 'user' && is_numeric($frontpage[1])) {
$uid = $frontpage[1];
}
}
return $uid;
}
The line
if (count($frontpage == 2) && $frontpage[0] == 'user' && is_numeric($frontpage[1])) {
should be written
if (count($frontpage) == 2 && $frontpage[0] == 'user' && is_numeric($frontpage[1])) {
Comment | File | Size | Author |
---|---|---|---|
#1 | xmlsitemap-284903-jmoy.patch | 1.47 KB | jmoy |
Comments
Comment #1
jmoy CreditAttribution: jmoy commentedThe error is in both xmlsitemap_user and xmlsitemap_term. Attaching patch.
Comment #2
apadernoComment #3
apadernoFixed in 6.x-1.x-dev.