WAIT: Error on query no results show template

[Please describe this bug in as much detail as possible so we can replicate & debug this bug]

When i make a query for author id posts, and the logged-in user has no posts, it loads a template as defined by the query settings, but also throws this error:

error-global-class-486

Seems logical that if nothing found, there’s a problem. But then the “no results” should kick in and show the template. It does show the template, but prints the error above it.

The “486” of the global classes from the error is the template to load on no results.
If i put the template on another page without the user post query, there’s no error.

This is the script to filter on user posts in “query editor PHP”:

$current_user_id = get_current_user_id();
return [
‘post_type’ => ‘myposttype’,
‘author’ => $current_user_id,
];

If a user has posts, there’s no error, and because the:

No results

Select a template or provide a custom text to show if this query doesn’t return any results.

template should run when there are no posts, the error is sort of the bug…

(and there’s no class or ID on the error so i cant hide it)

Hi,

can you check if the problem is solved in the latest 2.0-RC2 version? Please do it on the staging site, if you can and let me know.

Thank you,
Matej

As per Matej’s reply, this issue has been solved in 2.0-beta

1 Like