wanze / SeoMaestro

🧙‍♂️A ProcessWire module helping you to manage SEO related tasks like a boss.
MIT License
34 stars 9 forks source link

localHttpUrl does not exist #1

Closed lesaff closed 5 years ago

lesaff commented 5 years ago

Hi @wanze thanks for writing this module.

I got this error right after I added seo_maestro field to my template.

User Error

Exception: Method Page::localHttpUrl does not exist or is not callable in this context (in /####/public/wire/core/Wire.php line 519)

Note: Currently running a local PW site on Laravel Valet.

wanze commented 5 years ago

@lesaff

Thanks for testing!

Could you post the full stack trace from your logs? What version of ProcessWire are you using? I suppose the error is happening while the module tries to generate the sitemap. Is this a multi language site?

Edit: Please update to v0.3.0, the issue below has been fixed.

In the meantime I found a bug on single language installations, not sure this is related. In site/modules/SeoMaestro/templates/sitemap.xml./php, replace the check for the $languages variable with this line:

<?php if (isset($languages) && $languages instanceof Languages): ?>
wanze commented 5 years ago

@lesaff Should be fixed with the referenced commit. Can you pull the latest master and check if the issue is resolved on your end as well? Thanks!

lesaff commented 5 years ago

Trying it now, thx.

Edit: That did it, cheers! 👍