thgh / kirby-plugins

Plugins for Kirby CMS
MIT License
20 stars 2 forks source link

Error message on URL call #1

Open janstieler opened 9 years ago

janstieler commented 9 years ago

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

thgh commented 9 years ago

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

janstieler commented 9 years ago

Hi, yes I use a multilanguage site.

JimmyRittenborg commented 9 years ago

:+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.

mbernath commented 9 years ago

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...