Commit 78153055 authored by andrei.dincu's avatar andrei.dincu

Issue #2249723 by andrei.dincu: Check if field type exists in an entity_type...

Issue #2249723 by andrei.dincu: Check if field type exists in an entity_type and then add condition for bundles
parent 0f4d9462
......@@ -1861,8 +1861,10 @@ function xmlsitemap_xmlsitemap_index_links($limit) {
}
$entity_bundles[] = $bundle;
}
$query = \Drupal::entityManager()->getStorage($entity_type->id())->getQuery();
$query->condition('type', $entity_bundles, 'in');
$query = \Drupal::entityManager()->getStorage($entity_type_id)->getQuery();
if ($entity_type->get('type')) {
$query->condition('type', $entity_bundles, 'IN');
}
$ids = $query->execute();
xmlsitemap_xmlsitemap_process_entity_links($entity_type_id, $ids);
}
......
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