advanced-query-loop icon indicating copy to clipboard operation
advanced-query-loop copied to clipboard

Warning: Attempt to read property "ID" on null in advanced-query-loop/includes/Traits/Exclude_Current.php on line 36

Open dubajicp opened this issue 6 months ago • 1 comments

When "Exclude Current Post" option is enabled this warning shows up in debug log:

Warning: Attempt to read property "ID" on null in advanced-query-loop/includes/Traits/Exclude_Current.php on line 36

WP v6.8.1 AQL v4.1.1 Twenty Twenty-Five v1.2

To replicate (based on my setup)

  • Activate Twenty Twenty-Five theme
  • Go to FSE and edit "Single Post" template
  • Below the content add AQL block
  • Leave default options and just enable "Exclude Current Post" option
  • As soon as this is done you should see above warning in your debug log

dubajicp avatar May 27 '25 06:05 dubajicp

Thanks for reporting this. I'll take a look today.

ryanwelcher avatar May 27 '25 13:05 ryanwelcher