Add support for Simple XML sitemap 4.1+

Created on 7 March 2022, over 2 years ago
Updated 12 January 2024, 11 months ago

I just updated from Simple XML sitemap 8.3 to 4.1 and received this error when trying to recreate my news sitemap:

Fatal error: Declaration of Drupal\simple_sitemap_news\Plugin\simple_sitemap\SitemapGenerator\NewsSitemapGenerator::addSitemapAttributes() must be compatible with Drupal\simple_sitemap\Plugin\simple_sitemap\SitemapGenerator\DefaultSitemapGenerator::addSitemapAttributes(): void in /home/forge/mysite.com/web/modules/contrib/simple_sitemap_news/src/Plugin/simple_sitemap/SitemapGenerator/NewsSitemapGenerator.php on line 44

Help appreciated!

πŸ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States playful

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡·πŸ‡΄Romania sucka999

    Hello,
    i don't know the procedure to offer the patch, but i have created a diff file, it fixes drupal 10 support and fixes missing language parameter, now the result is valid i even sorted the parameters like in google's example, with drupal 10.2.1 and php 8.2.13 works as intended for me.
    Thanks.

  • πŸ‡·πŸ‡΄Romania sucka999

    I have pushed this version with all the fixes, it should be made available as a beta for people to test as this seems to work properly.

Production build 0.71.5 2024