Array
(
    [index] => bb_products
    [body] => Array
        (
            [query] => Array
                (
                    [bool] => Array
                        (
                            [filter] => Array
                                (
                                    [0] => Array
                                        (
                                            [term] => Array
                                                (
                                                    [create_info.status] => 4
                                                )

                                        )

                                    [1] => Array
                                        (
                                            [bool] => Array
                                                (
                                                    [should] => Array
                                                        (
                                                            [0] => Array
                                                                (
                                                                    [range] => Array
                                                                        (
                                                                            [price_city.hcm.regular] => Array
                                                                                (
                                                                                    [gt] => 100
                                                                                )

                                                                        )

                                                                )

                                                            [1] => Array
                                                                (
                                                                    [range] => Array
                                                                        (
                                                                            [price_city.all.regular] => Array
                                                                                (
                                                                                    [gt] => 100
                                                                                )

                                                                        )

                                                                )

                                                        )

                                                    [minimum_should_match] => 1
                                                )

                                        )

                                )

                            [must_not] => Array
                                (
                                    [0] => Array
                                        (
                                            [bool] => Array
                                                (
                                                    [must] => Array
                                                        (
                                                            [0] => Array
                                                                (
                                                                    [term] => Array
                                                                        (
                                                                            [shop_id] => 5cb41909ebe335f243e7c306
                                                                        )

                                                                )

                                                            [1] => Array
                                                                (
                                                                    [term] => Array
                                                                        (
                                                                            [is_combo] => 0
                                                                        )

                                                                )

                                                        )

                                                )

                                        )

                                    [1] => Array
                                        (
                                            [terms] => Array
                                                (
                                                    [occasion_ids] => Array
                                                        (
                                                            [0] => 6249181e9950d767e845f047
                                                        )

                                                )

                                        )

                                )

                            [must] => Array
                                (
                                    [0] => Array
                                        (
                                            [match] => Array
                                                (
                                                    [db_model] => products
                                                )

                                        )

                                )

                        )

                )

            [aggs] => Array
                (
                    [by_master] => Array
                        (
                            [terms] => Array
                                (
                                    [field] => master_id
                                    [size] => 84
                                )

                            [aggs] => Array
                                (
                                    [top_sales_hits] => Array
                                        (
                                            [top_hits] => Array
                                                (
                                                    [_source] => Array
                                                        (
                                                            [includes] => Array
                                                                (
                                                                    [0] => _id
                                                                    [1] => master_id
                                                                    [2] => cate_ids
                                                                    [3] => has_gift
                                                                    [4] => flower_type
                                                                    [5] => color
                                                                    [6] => style_id
                                                                    [7] => name
                                                                    [8] => code
                                                                    [9] => summary
                                                                    [10] => relationship_ids
                                                                    [11] => occasion_ids
                                                                    [12] => images
                                                                    [13] => review
                                                                    [14] => quick_delivery
                                                                    [15] => province_slug
                                                                    [16] => thumb
                                                                    [17] => prices
                                                                    [18] => is_combo
                                                                    [19] => combo_products
                                                                    [20] => materials
                                                                    [21] => intro
                                                                    [22] => attributes
                                                                    [23] => url_video
                                                                    [24] => price_city
                                                                    [25] => shop_id
                                                                    [26] => design
                                                                    [27] => at_home
                                                                    [28] => flower_delay
                                                                    [29] => source
                                                                )

                                                        )

                                                    [from] => 50
                                                    [size] => 52
                                                )

                                        )

                                )

                        )

                )

        )

    [size] => 0
)
400 Bad Request: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Top hits result window is too large, the top hits aggregator [top_sales_hits]'s from + size must be less than or equal to: [100] but was [102]. This limit can be set by changing the [index.max_inner_result_window] index level setting."}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"bb_products","node":"FP_dStN5TeCZaR_AVq27cg","reason":{"type":"illegal_argument_exception","reason":"Top hits result window is too large, the top hits aggregator [top_sales_hits]'s from + size must be less than or equal to: [100] but was [102]. This limit can be set by changing the [index.max_inner_result_window] index level setting."}}],"caused_by":{"type":"illegal_argument_exception","reason":"Top hits result window is too large, the top hits aggregator [top_sales_hits]'s from + size must be less than or equal to: [100] but was [102]. This limit can be set by changing the [index.max_inner_result_window] index level setting.","caused_by":{"type":"illegal_argument_exception","reason":"Top hits result window is too large, the top hits aggregator [top_sales_hits]'s from + size must be less than or equal to: [100] but was [102]. This limit can be set by changing the [index.max_inner_result_window] index level setting."}}},"status":400}
App\Controller\Component\ElasticsearchComponent->search() - APP/Controller/Component/ExtProductComponent.php, line 7706
App\Controller\Component\ExtProductComponent->loadProductsN() - APP/Controller/Component/ExtProductComponent.php, line 7823
App\Controller\Component\ExtProductComponent->getProductSpecialConds() - APP/Controller/ProductsController.php, line 6495
App\Controller\ProductsController->newproducts() - CORE/src/Controller/Controller.php, line 505
Cake\Controller\Controller->invokeAction() - CORE/src/Controller/ControllerFactory.php, line 166
Cake\Controller\ControllerFactory->handle() - CORE/src/Controller/ControllerFactory.php, line 141
Cake\Controller\ControllerFactory->invoke() - CORE/src/Http/BaseApplication.php, line 362
Cake\Http\BaseApplication->handle() - CORE/src/Http/Runner.php, line 86
Cake\Http\Runner->handle() - CORE/src/Http/Middleware/CsrfProtectionMiddleware.php, line 169
Cake\Http\Middleware\CsrfProtectionMiddleware->process() - CORE/src/Http/Runner.php, line 82
Cake\Http\Runner->handle() - CORE/src/Http/Middleware/BodyParserMiddleware.php, line 157
Cake\Http\Middleware\BodyParserMiddleware->process() - CORE/src/Http/Runner.php, line 82
Cake\Http\Runner->handle() - CORE/src/Routing/Middleware/RoutingMiddleware.php, line 117
Cake\Routing\Middleware\RoutingMiddleware->process() - CORE/src/Http/Runner.php, line 82
Cake\Http\Runner->handle() - CORE/src/Routing/Middleware/AssetMiddleware.php, line 70
Cake\Routing\Middleware\AssetMiddleware->process() - CORE/src/Http/Runner.php, line 82
Cake\Http\Runner->handle() - CORE/src/Error/Middleware/ErrorHandlerMiddleware.php, line 115
Cake\Error\Middleware\ErrorHandlerMiddleware->process() - CORE/src/Http/Runner.php, line 82
Cake\Http\Runner->handle() - CORE/src/Http/Runner.php, line 60
Cake\Http\Runner->run() - CORE/src/Http/Server.php, line 104
Cake\Http\Server->run() - ROOT/webroot/index.php, line 39
[main] - [main], line 0
Warning (2) : Trying to access array offset on null [in /www_local/new.belovedbeyond.com/src/Controller/Component/ExtProductComponent.php, line 8259]
Warning (2) : Trying to access array offset on null [in /www_local/new.belovedbeyond.com/src/Controller/Component/ExtProductComponent.php, line 8259]
Warning (2) : Trying to access array offset on null [in /www_local/new.belovedbeyond.com/src/Controller/Component/ExtProductComponent.php, line 8259]
Warning (512) : Unable to emit headers. Headers sent in file=/www_local/new.belovedbeyond.com/vendor/cakephp/cakephp/src/Core/functions.php line=209 [in /www_local/new.belovedbeyond.com/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 65]
Warning (2) : Cannot modify header information - headers already sent by (output started at /www_local/new.belovedbeyond.com/vendor/cakephp/cakephp/src/Core/functions.php:209) [in /www_local/new.belovedbeyond.com/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 159]
Warning (2) : Cannot modify header information - headers already sent by (output started at /www_local/new.belovedbeyond.com/vendor/cakephp/cakephp/src/Core/functions.php:209) [in /www_local/new.belovedbeyond.com/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 192]
Error: count(): Argument #1 ($value) must be of type Countable|array, null given

count(): Argument #1 ($value) must be of type Countable|array, null given 📋

TypeError
Error in: APP/Controller/Component/ExtProductComponent.php, line 7831
APP/Controller/Component/ExtProductComponent.php at line 7831 (edit)
        $page = ($offset / $limit);
        // pr($products);
        $more = @count($products) > $limit;
        if ($more) {
            array_pop($products);
        }

If you want to customize this error message, create templates/Error/error500.php