getgrav / grav-plugin-sitemap

Grav Sitemap Plugin

Home Page:https://getgrav.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Call to undefined method Grav\Common\Page\Page::canonical()

christianhanne opened this issue · comments

After enabling the plugin I get an error on the /sitemap page. I think the name of the method has changed in the most recent version of grav. Now you need to call routeCanonical instead. For backwards compatibility you might want to check if canonical or routeCanonical exists.

bildschirmfoto 2017-05-15 um 12 08 02

Cheers, Chris

Just checked my grav version... actually its the other way around. The method was called routeCanonical before and now its canonical. So I think the error will be fixed when I upgrade my grav installation.

Yes, a recent addition to the plugin is using a method that was introduced just recently (4 months ago) in Grav. Updating Grav will fix it.