0

Link-template.php line 389 is the get_page_link function declaration. I checked my templates and there are no dynamic calls to get_page_link, how do I find out where this is coming from?

It is an error that literally happens on every page load.

I suspect that it might have to do something with the wpml plugin, but how do I know for sure?

2022/07/21 12:44:15 [error] 103195#103195: *973611 FastCGI sent in stderr: "PHP message: PHP Warning: Attempt to read property "ID" on null in website/public/wp-includes/link-template.php on line 389PHP message: PHP Warning: Attempt to read property "ID" on null in website/public/wp-includes/link-template.php on line 404", client: 2.41.134.216, server: www.website.com, request: "GET / HTTP/1.1", host: "www.website.com:15846", referrer: "https://www.website/it/"
Krisztian Toth
  • 57
  • 3
  • 13
  • 3
    Try xdebug, or one of the other "manual" solutions described in https://stackoverflow.com/questions/1159216/how-can-i-get-php-to-produce-a-backtrace-upon-errors, to get a backtrace. – CBroe Jul 21 '22 at 13:52

1 Answers1

0

The solution was that I did a search in all the plugins and templates I have to see what could potentially call the function referred to. This narrowed down the options and now I can go ahead fixing the issue.

Krisztian Toth
  • 57
  • 3
  • 13