advanced-query-loop
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
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
Thanks for reporting this. I'll take a look today.