Problem/Motivation
I would like to regenerate the sitemap.xml on a website which has Config ReadOnly enabled.
This is currently not possible because I get the following error:
-> % drush xmlsitemap:regenerate
> [notice] https://mysite.local/sitemap.xml?page=1 wurde mit 535 Links erzeugt.
>
> In ConfigReadonlyStorage.php line 142:
>
> Your site configuration active store is currently locked.
>
>
In ProcessBase.php line 155:
Output is empty.
This also seems to be a problem when the regeneration process is being triggered via Drupal Cron because I get the following error in the watchdog
Drupal\config_readonly\Exception\ConfigReadonlyStorageException: Your site configuration active store is currently locked. in Drupal\config_readonly\Config\ConfigReadonlyStorage->checkLock() (line 142 of /home/purecnbk/dev/docroot/modules/contrib/config_readonly/src/Config/ConfigReadonlyStorage.php).
XML Sitemap Module 1.2
Drupal 9.3.3
Config ReadOnly 1.0.0-beta4
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | 3260837-generation-config-readonly.patch | 4.52 KB | dave reid |
Issue fork xmlsitemap-3260837
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
kevin.pfeifer commentedComment #3
kevin.pfeifer commentedThe following patch fixed at least the problem with the drush CLI not working.
Comment #4
kevin.pfeifer commentedComment #6
dave reidI don't think this is the right fix. We want to avoid calling xmlsitemap_sitemap_save() entirely, since that calls the save() method on the XmlSitemap config entity. We only care about saving the state information about the generation. Let's see if this test coverage fails.
Comment #8
dave reidTry that test again now that I added config_readonly as a test dependency to 8.x-1.x.
Comment #10
dave reidOne more test try.
Comment #13
dave reidComment #14
dave reidLet's try the patch version.
Comment #15
dave reidI have been able to confirm with a Kernel test the failure during sitemap generation and the MR now contains a fix that should pass the test.
Comment #16
dave reidLet's test the patch version, this passes locally for me.
Comment #18
dave reidConfirmed and merged the fix!