WPP Sortable columns warning in php 8+

[ad_1]

Hi @emilracerbil,

Thanks for the heads-up. I’ll have a look as soon as I can.

Hey @emilracerbil,

So I just tried this out, went to WP Dashboard > Posts then checked my debug.log file and didn’t find any warning messages related to the WPP Sortable Columns plugin. Even tried sorting posts by views count and got the same result, nothing came up in the log.

My setup:

  • WordPress 6.1.1
  • PHP 8.1.0
  • Active plugins: WordPress Popular Posts 6.1.1 and WordPress Popular Posts Sortable Columns 1.0.1

Anything else I should try to reproduce the issue?

Hi again!
Thanks for such a quick reply! I did some further testing and it seems to only be showing up with Elementor activated.

Maybe thats their problem then? 🙂

I had 3 of the same warnings with all plugins activated.
One warning was showing up with only Elementor activated.
With only Advanced Ads activated, 2 of the same warnings show up.

Perhaps Elementor is altering the $wp_query->query property in some way on the Posts list screen? That’s the only thing from your warning message that would trigger that array offset warning, and Elementor seems to be changing it to null for some reason? Might be worth a shot to reach out to their support team and see what they have to say about it.

From my side I can put in an additional check to make sure that $wp_query->query is an array, that’ll make the warning error go away but then chances are you won’t be able to sort posts by views count as the underlying issue –$wp_query->query being null instead of an array as expected- will still be there.

Alright, thanks for the help! I’ll see if i can get any useful information from them 🙂

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer