Skip to content

Commit

Permalink
Merge pull request #1666 from acquia/ACMS-3337
Browse files Browse the repository at this point in the history
ACMS-3337: Fix Simple Sitemap 4.1.7 version breaks site install.
  • Loading branch information
vishalkhode1 authored Nov 6, 2023
2 parents 325abf0 + 4decb50 commit fa94352
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
21 changes: 12 additions & 9 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion modules/acquia_cms_common/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"drupal/scheduler_content_moderation_integration": "^2.0",
"drupal/schema_metatag": "^2.4 || ^3.0",
"drupal/seckit": "^2.0",
"drupal/simple_sitemap": "^4.1",
"drupal/simple_sitemap": "4.1.7",
"drupal/smart_trim": "^2.0",
"drupal/social_media_links": "^2.9",
"drupal/username_enumeration_prevention": "^1.3",
Expand Down Expand Up @@ -81,6 +81,9 @@
"3371005 - Toolbar does not indicate active menu trail for pages not included in Toolbar": "https://git.drupalcode.org/project/drupal/-/commit/3165269bb01a5a8e5f53c1f369135b967c9d5924.patch",
"3370946 - Page title should contextualize the local navigation": "https://www.drupal.org/files/issues/2023-09-11/3370946-page-title-backport-10-1-x.patch",
"3347291: - Combine field storage and field instance forms": "https://www.drupal.org/files/issues/2023-09-13/10.1-3347291-combine-mega-e.patch"
},
"drupal/simple_sitemap": {
"3398996 - Declare min PHP version": "https://git.drupalcode.org/project/simple_sitemap/-/merge_requests/82.patch"
}
}
},
Expand Down
5 changes: 1 addition & 4 deletions modules/acquia_cms_common/src/Facade/SitemapFacade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Drupal\Core\Logger\LoggerChannelInterface;
use Drupal\node\NodeTypeInterface;
use Drupal\simple_sitemap\Manager\EntityManager;
use Drupal\simple_sitemap\Manager\VariantSetterTrait;
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
Expand All @@ -20,8 +19,6 @@
*/
final class SitemapFacade implements ContainerInjectionInterface {

use VariantSetterTrait;

/**
* The config installer service.
*
Expand Down Expand Up @@ -93,7 +90,7 @@ public function enableSitemap(NodeTypeInterface $node_type) {
return;
}
// Check if the entity type is enabled and variant exists for the sitemap.
$all_default_variants = $this->getVariants();
$all_default_variants = array_keys($this->sitemapManager->getSitemaps());
if ($this->sitemapManager->entityTypeIsEnabled('node') && in_array($sitemap_variant, $all_default_variants)) {
$this->sitemapManager->setBundleSettings('node', $node_type->id());
}
Expand Down

0 comments on commit fa94352

Please sign in to comment.