WAIT: Uncaught TypeError: Unsupported operand types: string - int in query.php

Hi all,

I’m seeing this critical error in the WooCommerce logs, never encountered it before:
Uncaught TypeError: Unsupported operand types: string - int in /wp-content/themes/bricks/includes/query.php:1504

Server: Apache/2.4.58 (Ubuntu)
PHP Version: 8.0.41
WordPress Version: 6.8.1
Bricks Version: 1.12.4

Let me know if I can provide anything beyond that to help debug it.
Thanks!

Hi @Allucinante,

I can’t reproduce this issue locally. But, looking at the code, can you check your query loop settings on the page where this is happening?
Especially “posts per page” and “offset” settings, check if the values are ok. You can also attach a screenshot here.

Please let me know.
Matej

There’s only one particularity that comes to mind here and that is that I’ve set the order “Default” for the product archive query because it was the ONLY way that the custom menu order setting from WooCommerce (setting accessible only in the WP Customizer) would carry over to Bricks and actually display the correct order. Can you replicate it that way?

image

Here are the customizer settings, sorry they’re in German but here’s a translation:

1: Display on the Shop page (show products)
2: Category display (show products)
3: Standard sorting (custom ordering)
4: Column count (probably irrelevant)
5 Row count (probably irrelevant)

Unfortunately, the error thrown does not specify WHERE it occurs. There are other Product layout elements on the site but they are ordered by date, which I assume not to be the cause of any troubles. This one template here is the only one with an unusual setting.

Cheers,
SVT

Hi,

sadly, I can’t replicate it locally. :frowning: If you change the settings in your second screenshot, does the issue still occur?

Additionally, can you try to disable all plugins and disable all custom code, just to confirm that the problem is not because of some conflict?

Thanks.