getgrav / grav-plugin-sitemap

Grav Sitemap Plugin
https://getgrav.org
MIT License
42 stars 42 forks source link

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

Closed christianhanne closed 7 years ago

christianhanne commented 7 years ago

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

christianhanne commented 7 years ago

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.

flaviocopes commented 7 years ago

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.