[X] I have searched for similar issues in open and closed tickets and cannot find a duplicate.
[X] I have troubleshooted my issue, and it still exists against the latest stable version of Elementor.
Description
If in the loop-grid widget the "Items Per Page" or "Columns" settings are set to no value it will lead to a fatal Uncaught TypeError in /elementor-pro/modules/woocommerce/module.php at line 1601 inside the adjust_setting_for_product_renderer() function. This is because the ceil() function will be called with a string parameter instead of numeric.
Possible solutions:
The settings should not be allowed to be left to empty value (i.e. required settings).
Switch the isset() to ! empty() since probably the 0 numeric value wouldn't make any difference to the rows calculation.
The empty string value should get a numeric representation if it's somehow meaningful to the rows calculation.
The if statement at line 1600 should check for empty string before trying to calculate the rows setting.
Prerequisites
Description
If in the loop-grid widget the "Items Per Page" or "Columns" settings are set to no value it will lead to a fatal
Uncaught TypeError
in/elementor-pro/modules/woocommerce/module.php
at line1601
inside theadjust_setting_for_product_renderer()
function. This is because theceil()
function will be called with a string parameter instead of numeric.Possible solutions:
isset()
to! empty()
since probably the0
numeric value wouldn't make any difference to the rows calculation.rows
calculation.if
statement at line 1600 should check for empty string before trying to calculate therows
setting.Here's the stack trace:
Steps to reproduce
Expected behavior
Expected behavior is for the code to not produce fatal errors and break people's sites.
Isolating the problem
Elementor System Info
Agreement