Account created on 5 September 2011, over 13 years ago
#

Recent comments

Patch created on-demand for those in need. I do not know where to park the patch file.
Filename: "3499531-fix-implicit-nullables.patch"

diff --git a/src/Entity/XmlSitemap.php b/src/Entity/XmlSitemap.php
index 354c0eb..7876571 100644
--- a/src/Entity/XmlSitemap.php
+++ b/src/Entity/XmlSitemap.php
@@ -197,7 +197,7 @@ class XmlSitemap extends ConfigEntityBase implements XmlSitemapInterface {
   /**
    * {@inheritdoc}
    */
-  public static function loadByContext(array $context = NULL) {
+  public static function loadByContext(?array $context = NULL) {
     if (!isset($context)) {
       $context = xmlsitemap_get_current_context();
     }
diff --git a/src/XmlSitemapInterface.php b/src/XmlSitemapInterface.php
index 1d7ec50..b28d7d4 100644
--- a/src/XmlSitemapInterface.php
+++ b/src/XmlSitemapInterface.php
@@ -137,14 +137,14 @@ interface XmlSitemapInterface extends ConfigEntityInterface {
   /**
    * Returns the sitemap with the context specified as parameter.
    *
-   * @param array $context
+   * @param array|null $context
    *   An optional XML Sitemap context array to use to find the correct XML
    *   sitemap. If not provided, the current site's context will be used.
    *
    * @return \Drupal\xmlsitemap\XmlSitemapInterface
    *   Sitemap with the specified context or NULL.
    */
-  public static function loadByContext(array $context = NULL);
+  public static function loadByContext(?array $context = NULL);
 
   /**
    * Save the state information about the sitemap.
diff --git a/src/XmlSitemapLinkStorage.php b/src/XmlSitemapLinkStorage.php
index 9c7827d..22ebc1f 100644
--- a/src/XmlSitemapLinkStorage.php
+++ b/src/XmlSitemapLinkStorage.php
@@ -245,7 +245,7 @@ class XmlSitemapLinkStorage implements XmlSitemapLinkStorageInterface {
   /**
    * {@inheritdoc}
    */
-  public function checkChangedLink(array $link, array $original_link = NULL, $flag = FALSE) {
+  public function checkChangedLink(array $link, ?array $original_link = NULL, $flag = FALSE) {
     $changed = FALSE;
 
     if ($original_link === NULL) {
@@ -406,7 +406,7 @@ class XmlSitemapLinkStorage implements XmlSitemapLinkStorageInterface {
   /**
    * {@inheritdoc}
    */
-  public function getEntityQuery(string $entity_type_id, array $bundles = [], SelectInterface $subquery = NULL, string $subquery_operator = 'IN'): QueryInterface {
+  public function getEntityQuery(string $entity_type_id, array $bundles = [], ?SelectInterface $subquery = NULL, string $subquery_operator = 'IN'): QueryInterface {
     $storage = $this->entityTypeManager->getStorage($entity_type_id);
     $entity_type = $storage->getEntityType();
     $query = $storage->getQuery();
diff --git a/src/XmlSitemapLinkStorageInterface.php b/src/XmlSitemapLinkStorageInterface.php
index dda0d0d..49dead8 100644
--- a/src/XmlSitemapLinkStorageInterface.php
+++ b/src/XmlSitemapLinkStorageInterface.php
@@ -45,7 +45,7 @@ interface XmlSitemapLinkStorageInterface {
    * @return bool
    *   TRUE if the link is changed, or FALSE otherwise.
    */
-  public function checkChangedLink(array $link, array $original_link = NULL, $flag = FALSE);
+  public function checkChangedLink(array $link, ?array $original_link = NULL, $flag = FALSE);
 
   /**
    * Check if there is a visible sitemap link given a certain set of conditions.
@@ -169,6 +169,6 @@ interface XmlSitemapLinkStorageInterface {
    * @return \Drupal\Core\Entity\Query\QueryInterface
    *   The entity query object.
    */
-  public function getEntityQuery(string $entity_type_id, array $bundles = [], SelectInterface $subquery = NULL, string $subquery_operator = 'IN'): QueryInterface;
+  public function getEntityQuery(string $entity_type_id, array $bundles = [], ?SelectInterface $subquery = NULL, string $subquery_operator = 'IN'): QueryInterface;
 
 }
diff --git a/src/XmlSitemapStorage.php b/src/XmlSitemapStorage.php
index d469020..d52bf6a 100644
--- a/src/XmlSitemapStorage.php
+++ b/src/XmlSitemapStorage.php
@@ -40,7 +40,7 @@ class XmlSitemapStorage extends ConfigEntityStorage {
    * @param \Drupal\Core\Cache\MemoryCache\MemoryCacheInterface|null $memory_cache
    *   The memory cache backend.
    */
-  public function __construct(EntityTypeInterface $entity_type, ConfigFactoryInterface $config_factory, UuidInterface $uuid_service, LanguageManagerInterface $language_manager, StateInterface $state, MemoryCacheInterface $memory_cache = NULL) {
+  public function __construct(EntityTypeInterface $entity_type, ConfigFactoryInterface $config_factory, UuidInterface $uuid_service, LanguageManagerInterface $language_manager, StateInterface $state, ?MemoryCacheInterface $memory_cache = NULL) {
     parent::__construct($entity_type, $config_factory, $uuid_service, $language_manager, $memory_cache);
     $this->state = $state;
   }
@@ -75,7 +75,7 @@ class XmlSitemapStorage extends ConfigEntityStorage {
   /**
    * {@inheritdoc}
    */
-  protected function doLoadMultiple(array $ids = NULL) {
+  protected function doLoadMultiple(?array $ids = NULL) {
     $entities = parent::doLoadMultiple($ids);
 
     // Load the auxiliar xmlsitemap data and attach it to the entity.
diff --git a/src/XmlSitemapWriter.php b/src/XmlSitemapWriter.php
index 246e8ab..df921e7 100644
--- a/src/XmlSitemapWriter.php
+++ b/src/XmlSitemapWriter.php
@@ -173,7 +173,7 @@ class XmlSitemapWriter extends \XMLWriter {
    * @param string|array $content
    *   The element contents or an array of the elements' sub-elements.
    */
-  public function writeElement(string $name, string|array $content = NULL): bool {
+  public function writeElement(string $name, string|array|null $content = NULL): bool {
     if (is_array($content)) {
       $return = $this->startElement($name);
       $return &= $this->writeRaw($this->formatXmlElements($content));
diff --git a/xmlsitemap.module b/xmlsitemap.module
index 7448051..ce969c2 100644
--- a/xmlsitemap.module
+++ b/xmlsitemap.module
@@ -485,7 +485,7 @@ function xmlsitemap_sitemap_uri(XmlSitemapInterface $sitemap) {
 /**
  * @} End of "defgroup xmlsitemap_api"
  */
-function xmlsitemap_get_directory(XmlSitemapInterface $sitemap = NULL, $directory = NULL) {
+function xmlsitemap_get_directory(?XmlSitemapInterface $sitemap = NULL, $directory = NULL) {
   if (!isset($directory)) {
     $directory = \Drupal::config('xmlsitemap.settings')->get('path') ?: 'xmlsitemap';
   }
@@ -502,7 +502,7 @@ function xmlsitemap_get_directory(XmlSitemapInterface $sitemap = NULL, $director
 /**
  * Check that the sitemap files directory exists and is writable.
  */
-function xmlsitemap_check_directory(XmlSitemapInterface $sitemap = NULL) {
+function xmlsitemap_check_directory(?XmlSitemapInterface $sitemap = NULL) {
   $directory = xmlsitemap_get_directory($sitemap);
   /** @var \Drupal\Core\File\FileSystemInterface $filesystem */
   $filesystem = \Drupal::service('file_system');
@@ -552,7 +552,7 @@ function xmlsitemap_check_all_directories() {
  * @return bool
  *   Returns TRUE is operation was successful, FALSE otherwise.
  */
-function xmlsitemap_clear_directory(XmlSitemapInterface $sitemap = NULL, $delete = FALSE) {
+function xmlsitemap_clear_directory(?XmlSitemapInterface $sitemap = NULL, $delete = FALSE) {
   $directory = xmlsitemap_get_directory($sitemap);
   return _xmlsitemap_delete_recursive($directory, $delete);
 }
@@ -2155,7 +2155,7 @@ function xmlsitemap_get_status_options($default = NULL) {
  * @return int|string
  *   Returns current chunk of the sitemap.
  */
-function xmlsitemap_get_current_chunk(XmlSitemapInterface $sitemap, Request $request = NULL) {
+function xmlsitemap_get_current_chunk(XmlSitemapInterface $sitemap, ?Request $request = NULL) {
   if (!isset($request)) {
     $request = \Drupal::request();
   }

Everything is functioning properly now.

I reviewed the PHP requirements and inspected the update directory using the tree command. I noticed that the file core/modules/update/update.links.action.yml was present. Later, during New Year's crossover night, I removed the patch for my local development environment, which resolved the issue locally, but the remote environment still wasn't working.

This morning, I reinstalled the application using Composer after deleting the web/core directory. Now, everything is working perfectly.

thanks to @catcc, @drw, @nicxvan

Funny!
Without the patches, site loads the modules extension and the Appearance pages locally but not on remote server which runs on Apache and PHP 8.4 / 8.3.

i do not know what is going on now...

yes, using drush
drush updb -y

and when I URL to https://{DOMAIN}/admin/modules
I am still getting the same thing
But When I reset the "update/src/Routing/UpdateRouteSubscriber.ph"
the site will be down completely using the following patch

https://www.drupal.org/files/issues/2024-12-28/3494938-add-report-module-and-theme-to-routes.patch

I re-added the "update.links.action.yml" file back into the "core/modules/update/"
using attached patch and am still getting the same error.

Any other options.

I use composer to update to Drupal 10.4 and I have the same problem
Message from Log:
Symfony\Component\Routing\Exception\RouteNotFoundException: Route "update.module_install" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 211 of core/lib/Drupal/Core/Routing/RouteProvider.php).
Symfony\Component\Routing\Exception\RouteNotFoundException: Route "update.theme_install" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 211 of core/lib/Drupal/Core/Routing/RouteProvider.php).

is their any patch for this until it is fixed?

Production build 0.71.5 2024