kirbyzone / sitemapper

Kirbyzone's Automatic Sitemap Generator Plugin for Kirby 3
MIT License
10 stars 2 forks source link

Cannot change language #5

Open mynameisfreedom opened 2 years ago

mynameisfreedom commented 2 years ago

Hi there! Thank you the beautiful plugin. But there is an issue that language cannot be changed while this plugin is there.

The fix is to change line 23 in index.php from

'title' => site()->title() . ' Sitemap',

to

'title' => 'Sitemap',

squareclouds commented 2 years ago

thank you @mynameisfreedom !!! i just realized the site.yml was having trouble (everything else was fine, at least on my installation) and it is fixed after this.

moritzebeling commented 2 years ago

I can confirm, when the plugin is installed in a multilang Kirby setup:

moritzebeling commented 2 years ago

I can also confirm, that the suggested fix works. I am opening a PR...

moritzebeling commented 2 years ago

Please consider merging it or changing it on your own. Thank you!

iamlinkus commented 2 years ago

I can confirm. Just spent 2 hours trying to debug both my own code and kirby code until I remembered to try and remove sitemapper.

Looks like sitemapper isn't at all friendly with multilang setups as my site content was behaving super unexpectedly (switching languages on the panel always loaded only the default language content) and I never imagined that this plugin might bug the hell out of all the stuff that's not even related to the sitemap.

Thanks @moritzebeling for the quick fix. I wish I could help and fix this bug while retaining the full site title, but hopefully someone will. :)