nicoknoll / MarkupSEO

The all-in-one SEO solution for ProcessWire.
13 stars 30 forks source link

Incompatibility with PW3.0.4X #33

Open eladnova opened 7 years ago

eladnova commented 7 years ago

Hi Nico

As per the forums, a few users reporting issues with upgrades to PW3.0.4X In my case the META tags don't render at all. I'm using <?php echo $page->seo->render;?>

Any idea when you could look at this?

gmclelland commented 7 years ago

It worked fine with 3.0.44, but then with 3.0.45 it causes an error.

Tracy Debugger reports the following: PHP Notice: Trying to get property of non-object in .../wwwroot/site/modules/MarkupSEO/MarkupSEO.module:127

gmclelland commented 7 years ago

I wonder if it is related to the new changes in Hooks https://github.com/processwire/processwire/commit/953ca720144e8018b2ecd4d0a36dbd0033fb21d6 ?

If I debug that line 127 bd($this->page); show's the page object but doesn't show any seo information attached to it.

eladnova commented 7 years ago

Hey @gmclelland I'm not sure. Not too familiar with the inner workings of hooks etc. Wondering if this is an issue for here or for the PW repo?

gmclelland commented 7 years ago

Not sure, I'm new to Processwire and hooks as well.

rolandtoth commented 7 years ago

I think there's a PW core change that is causing this. $this->addHookProperty seems not working in this module anymore.

Changing this line seem to work (only trial and error):

//$this->addHookProperty("Page::seo", $this, 'hookFrontendPage');
$this->wire('page')->addHookProperty("seo", $this, 'hookFrontendPage');
rolandtoth commented 7 years ago

Fixed 15 minutes ago :)

gmclelland commented 7 years ago

Good news! Thanks for the heads up @rolandtoth.

blynx commented 7 years ago

Seems to be fixed in ProcessWire:

https://processwire.com/talk/topic/8007-markupseo-the-all-in-one-seo-solution-for-processwire/?do=findComment&comment=135414

edit: ah oh - rolandtoth already linked that. sry