Fixed Cannot extend Sitemap Renderer

Affected version
2.1.9
I tried to extend XF\Sitemap\Renderer with a class extension but it did not work as expected.

In App.php I find the code setting up the renderer into the container after line 1104. Is there a reason not to use $this->extendClass($class); like in the other closures? After modifying the closure to relay on class extensions everything worked as expected.
 
I can’t recall a specific reason we didn’t allow it here so we could consider changing it.

What’s the specific use case you have in mind for extending it?
 
Can you elaborate what you mean by “sub sitemaps” and which SEO optimisations specifically? So far it doesn’t seem to me like extending the renderer is necessary but I’m not sure.
 
Can you elaborate what you mean by “sub sitemaps” and which SEO optimisations specifically? So far it doesn’t seem to me like extending the renderer is necessary but I’m not sure.

We need to add our custom generated sitemaps and the Renderer must be modified to deliver different sitemaps for different languages and to get rid of some more logic. I'm not sure if it's the best idea to hack into the Renderer but we would be really happy if the Renderer could be extended by a class extension ;-)
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.0 Beta 2).

Change log:
Allow the sitemap renderer to be extended
There may be a delay before changes are rolled out to the XenForo Community.
 
Top Bottom