1

Recent logs lies to me.

enter image description here

enter image description here

I even did a dpm($node->title); with devel and indeed it's there.

I have like 6 pages of these notices that appear per page load. They are all different locations but they all have the same error type, property of non object. Has anyone experienced something like this?

enter image description here

I don't think it's a hack, at least not a Core hack, cause Core has been updated several times.

Ugh, soo strange.


This is hard to debug, here is another example

enter image description here

As you can see, I created a variable $test = i18n_language()->language and xdebug tells me $test = "en" yet on line 230 it fails to get the value according to the log.

enter image description here

10
  • Could it be related somehow to "Menu Block"? Have you seen this issue? Oct 17 '17 at 11:22
  • 1
    Just debug it - add a condition to check if node is not an object, and print a debug backtrace when it is. The log messages definitely aren't lying to you, at best PHP is lying to you, but that's quite unlikely
    – Clive
    Oct 17 '17 at 13:16
  • 1
    @Pierre.Vriens mystery solved.
    – No Sssweat
    Oct 18 '17 at 11:17
  • 1
    @longboardnode mystery solved.
    – No Sssweat
    Oct 18 '17 at 11:17
  • 1
    Wow! that took some major sleuthing, glad it resolved!! Oct 19 '17 at 20:04
1

Finally solved this mystery.

I was able to narrow it down to a bean block in the site's footer. Upon inspecting all of the bean's block display fields

enter image description here

Disabling this field fixed the issue. Where is it coming from? IDK yet. I will update once I know. Seems like custom module.

Update

Yep, turns out Featurette image link is coming from a custom module. Notice the big error in line 24 and line 30.

enter image description here

More errors here, what a mess!

enter image description here

1
  • 1
    lol @Pierre.Vriens, apparently featurettes is actually a thing, but for us it's just the name of a Bean Block Type. I wasn't the one who came up with the name ;p
    – No Sssweat
    Nov 6 '17 at 11:56
0

Based on the information posed in the question, and your theme switch test- it sounds like you have some custom templates or template.php functions in your theme that call/use a variable (in this case, probably the title field) without first checking if the variable is actually set.

check for any custom php conditionals or processing of your custom fields/entities in your templates. Ideally, you'll want to wrap any operation that does something with them in a conditional. For example:

if ( array_key_exists('myCustomVariable',$content) && isset($content['myCustomVariable']) ) { 
  print render($content['myCustomVariable'];
}

Also worth noting, the title of your individual node types is not available (by default) in the page.tpl.php or html.tpl.php templates without some modifications and custom hooks in your theme to make the variable available.

1
  • Thanks for the tip, but turnout the theme was not the issue.
    – No Sssweat
    Oct 18 '17 at 8:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.