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.
Followup for #3099673-8: Replace deprecated file_scan_directory()
Followup for #3099673-8: Replace deprecated file_scan_directory()
Comments
Comment #2
volegerHere the patch
Comment #3
alex_optimLooks good.
Comment #4
voleger#3134571: Drupal 9 compatibility filled to address branch Drupal 9 compatibility issues
Comment #5
pifagorComment #7
pifagorComment #9
Dave ReidAny idea why this was added? The issue here is scant on details.
Comment #10
Dave ReidIf the directory doesn't exist, doesn't it mean that the sitemap file writing process also failed? Why wouldn't we want to expose a failure here instead of letting it silently fail?
Comment #11
Dave ReidI think this would be better, we should throw an exception when xmlsitemap_check_directory() fails, instead of silently letting it pass through, which I think is the issue here. Because then nothing in the generation process would actually work if the directory didn't exist.
Comment #13
Dave ReidI've updated xmlsitemap_sitemap_get_directory() to always return a valid value, so the test that sets the directory to empty is no longer valid and is removed. It shouldn't be a possible condition since the config is required.
Comment #15
Dave ReidTested and committed #13 to 8.x-1.x.