kirby-plugins icon indicating copy to clipboard operation
kirby-plugins copied to clipboard

Error message on URL call

Open janstieler opened this issue 10 years ago • 4 comments

HI, I use kirby 2 and I got the error Fatal error: Call to a member function code() on a non-object in /homepages/17/d39311005/htdocs/sevendays/kirby/kirby.php on line 526 if I call the example.com/sitemap.xml

Do you know what I'm doing wrong?

Cheers

janstieler avatar Aug 08 '15 16:08 janstieler

It doesn't seem to work with multilang enabled. I haven't found the time to look further into it.

Related line: https://github.com/getkirby/kirby/blob/master/kirby.php#L526

thgh avatar Aug 09 '15 09:08 thgh

Hi, yes I use a multilanguage site.

janstieler avatar Aug 09 '15 15:08 janstieler

:+1: for multilanguage support - i think it will need a sitemap per language like sitemap.en.xml and sitemap.da.xml but im not entirely sure what Google requires nowadays.

JimmyRittenborg avatar Aug 19 '15 13:08 JimmyRittenborg

Hi, I can confirm that the problem occurs with multi language support enabled.

I'm not able to provide a fix atm, but:

  1. The error seems to come from kirby()->routes(...) and not the action inside. I haven't found any spec how the routesmethod must be used differently, when multilanguage is turned on.
  2. In case multi language is turned on, the plugin should produce an output as it is described here: https://support.google.com/webmasters/answer/2620865?hl=en

Maybe that helps someone...

mbernath avatar Aug 25 '15 12:08 mbernath