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.
Found this after enabling xmlsitemap in D8 ver. beta 9
Drupal\Core\Config\ImmutableConfigException: Can not set values on immutable configuration xmlsitemap_engines.settings:engines. Use \Drupal\Core\Config\ConfigFactoryInterface::getEditable() to retrieve a mutable configuration object in Drupal\Core\Config\ImmutableConfig->set() (line 34 of /Users/tasya/Sites/xmlsitemap/core/lib/Drupal/Core/Config/ImmutableConfig.php).
Comment | File | Size | Author |
---|---|---|---|
#2 | 2467133-2.patch | 1.39 KB | lhangea |
Comments
Comment #1
lhangea CreditAttribution: lhangea commentedI also ran into this issue at install/uninstall. Basically we need to use
\Drupal::getContainer()->get('config.factory')->getEditable('xmlsitemap_engines.settings')
instead of
\Drupal::config('xmlsitemap_engines.settings')
in the .install file.
Comment #2
lhangea CreditAttribution: lhangea commentedHere's a patch for that. After this patch the module install/uninstall is clean.
Comment #4
paulmckibbenThanks for the patch! I reviewed it, and the code looks good. I applied it, and it fixes the problem: xmlsitemap_engine now installs and uninstalls cleanly in D8 beta10.