backdrop-contrib / metatag

Add structured metadata, aka "meta tags", for various pages on your site.
GNU General Public License v2.0
3 stars 15 forks source link

Undefined property: stdClass::$language #70

Closed simone960 closed 1 year ago

simone960 commented 3 years ago

I have created a Views page and override the Metatag in Views, I noticed every time I view the page, there's a message in the recent log messages:

Notice: Undefined property: stdClass::$language in metatag_views_preprocess_page() (line 127 of /var/lib/tugboat/backdrop/modules/metatag/metatag_views/metatag_views.module).

So I fill the "Content language" with "und", the notice will still appear, but if I fill it as "en", an extra notice also shown up:

Theme hook "metatag_http_equiv" not found.

Here's the demo site I created:

https://latest-ur0jttnru8wwdwjjt9ghmo7q8tzgmli1.tugboat.qa

The Views page: https://latest-ur0jttnru8wwdwjjt9ghmo7q8tzgmli1.tugboat.qa/post

herbdool commented 3 years ago

It likely needs to be ->langcode to match the changes in core.

quicksketch commented 1 year ago

Thanks @simone960 and @herbdool. There had been some instances of $node->language and $language->language that both needed to be updated to ->langcode like Herb said. I fixed these in https://github.com/backdrop-contrib/metatag/pull/91. Tests are increasingly passed, but there are other unrelated issues to this one that need to be fixed yet. I'm working through these and hope to have a new release out shortly.