Commit 6615a6fe authored by andrei.dincu's avatar andrei.dincu

Issue #2249723 by andrei.dincu: Get bundle id with ->bundle() not with...

Issue #2249723 by andrei.dincu: Get bundle id with ->bundle() not with ->label() in xmlsitemap_link_save()
parent d2090d85
......@@ -260,7 +260,7 @@ function xmlsitemap_schema() {
'default' => 0,
),
),
'primary key' => array('id', 'type', 'language'),
'primary key' => array('id', 'type'),
'indexes' => array(
'loc' => array('loc'),
'access_status_loc' => array('access', 'status', 'loc'),
......
......@@ -530,7 +530,7 @@ function xmlsitemap_link_save(array $link) {
$link['changecount'] = 0;
}
$existing = db_query_range("SELECT loc, access, status, lastmod, priority, changefreq, changecount, language FROM {xmlsitemap} WHERE type = :type AND id = :id AND language = :language", 0, 1, array(':type' => $link['type'], ':id' => $link['id'], ':language' => $link['language']))->fetchAssoc();
$existing = db_query_range("SELECT loc, access, status, lastmod, priority, changefreq, changecount, language FROM {xmlsitemap} WHERE type = :type AND id = :id", 0, 1, array(':type' => $link['type'], ':id' => $link['id']))->fetchAssoc();
// Check if this is a changed link and set the regenerate flag if necessary.
if (!\Drupal::state()->get('xmlsitemap_regenerate_needed')) {
......@@ -1917,7 +1917,7 @@ function xmlsitemap_entity_create_link(EntityInterface $entity) {
}
}
$settings = xmlsitemap_link_bundle_load($entity->getEntityTypeId(), $entity->label());
$settings = xmlsitemap_link_bundle_load($entity->getEntityTypeId(), $entity->bundle());
$uri = $entity->url();
$entity->xmlsitemap += array(
'type' => $entity->getEntityTypeId(),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment