Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

βœ… πŸ”— 🐞 Bug Report: Loop Carousel throws Fatal Error if the Number of Slides control is empty "base-carousel-trait.php" (Duplicate of #23804) #23817

Closed
5 tasks done
bobhuf opened this issue Sep 15, 2023 · 5 comments
Labels
bug Indicates a bug with one or multiple components. compatibility/assets Indicates a compatibility problem with scripts or CSS. component/code Indicates when a topic is related to a component’s code. duplicate Indicates when an Issue or a Discussion is a duplicate of another Issue or Discussion. mod* product/pro Indicates if the referenced component is part of the Elementor Pro plugin. solved Indicates that an Issue has been Solved, or a Feature Request has been Released. status/merged Indicates when a Pull Request has been merged to a Release. widget/loop-builder/carousel References the Loop Carousel (Pro) nested widget.
Milestone

Comments

@bobhuf
Copy link

bobhuf commented Sep 15, 2023

Prerequisites

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • The issue still exists against the latest stable version of Elementor.

Description

I was just hit with the following error on a production site:


>  Warning: Undefined array key "carousel_items" in ../wp-content/plugins/elementor-pro/base/base-carousel-trait.php on line 1385
>  Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in ../wp-content/plugins/elementor-pro/base/base-carousel-trait.php:1385 
Stack trace: 
#0 ../wp-content/plugins/elementor-pro/base/base-carousel-trait.php(1385): count(NULL) 
#1 ../wp-content/plugins/elementor-pro/base/base-carousel-trait.php(1080): ElementorPro\Modules\LoopBuilder\Widgets\Loop_Carousel->get_num_of_carousel_items(Array) 
#2 ../wp-content/plugins/elementor-pro/modules/loop-builder/widgets/loop-carousel.php(140): ElementorPro\Modules\LoopBuilder\Widgets\Loop_Carousel->render_carousel_footer(Array) 
#3 ../wp-content/plugins/elementor-pro/modules/loop-builder/skins/skin-loop-base.php(193): ElementorPro\Modules\LoopBuilder\Widgets\Loop_Carousel->render_loop_footer() 
#4 ../wp-content/plugins/elementor-pro/modules/posts/skins/skin-base.php(882): ElementorPro\Modules\LoopBuilder\Skins\Skin_Loop_Base->render_loop_footer() 
#5 ../wp-content/plugins/elementor-pro/modules/loop-builder/skins/skin-loop-base.php(89): ElementorPro\Modules\Posts\Skins\Skin_Base->render() 
#6 ../wp-content/plugins/elementor/includes/base/skin-base.php(79): ElementorPro\Modules\LoopBuilder\Skins\Skin_Loop_Base->render() 
#7 ../wp-content/plugins/elementor/includes/base/widget-base.php(607): Elementor\Skin_Base->render_by_mode() 
#8 ../wp-content/plugins/elementor/includes/base/widget-base.php(750): Elementor\Widget_Base->render_content() 
#9 ../wp-content/plugins/elementor/includes/base/element-base.php(464): Elementor\Widget_Base->print_content() 
#10 ../wp-content/plugins/elementor/includes/base/element-base.php(1375): Elementor\Element_Base->print_element() 
#11 ../wp-content/plugins/elementor/includes/base/element-base.php(464): Elementor\Element_Base->print_content() 
#12 ../wp-content/plugins/elementor/includes/base/element-base.php(1375): Elementor\Element_Base->print_element() 
#13 ../wp-content/plugins/elementor/includes/base/element-base.php(464): Elementor\Element_Base->print_content() 
#14 ../wp-content/plugins/elementor/core/base/document.php(1739): Elementor\Element_Base->print_element() 
#15 ../wp-content/plugins/elementor/core/base/document.php(1134): Elementor\Core\Base\Document->print_elements(Array) 
#16 ../wp-content/plugins/elementor/includes/frontend.php(1179): Elementor\Core\Base\Document->print_elements_with_wrapper(Array) 
#17 ../wp-content/plugins/elementor/includes/frontend.php(1074): Elementor\Frontend->get_builder_content(2) 
#18 ../wp-includes/class-wp-hook.php(310): Elementor\Frontend->apply_builder_in_content('We grow you...') 
#19 ../wp-includes/plugin.php(205): WP_Hook->apply_filters('We grow you...', Array) 
#20 ../wp-includes/post-template.php(256): apply_filters('the_content', 'We grow you...') 
#21 ../wp-content/themes/hello-elementor/template-parts/single.php(25): the_content() 
#22 ../wp-includes/template.php(787): require('/Users/x...') 
#23 ../wp-includes/template.php(720): load_template('/Users/x...', false, Array) 
#24 ../wp-includes/general-template.php(206): locate_template(Array, true, false, Array) 
#25 ../wp-content/themes/hello-elementor/index.php(21): get_template_part('template-parts/...') 
#26 ../wp-includes/template-loader.php(106): include('/Users/x...') 
#27 ../wp-blog-header.php(19): require_once('/Users/x...') 
#28 ../index.php(17): require('/Users/x...') 
#29 {main} thrown in ../wp-content/plugins/elementor-pro/base/base-carousel-trait.php on line 1385

Cloned the site to Local, disabled everything and the error still persists. Using the 'Loop Carousel' element.

Rollback to 3.15.1 and 3.15.2 (pro) fixed the problem.

Steps to reproduce

This website hasn't been touched in months. The loop carousel element contains some very basic elements (image and text).

Isolating the problem

  • This bug happens with only Elementor plugin active (and Elementor Pro).
  • This bug happens with a Blank WordPress theme active (Hello theme).
  • I can reproduce this bug consistently following the steps above.

System Info

Click to reveal
== Server Environment ==
	Operating System: Darwin
	Software: nginx/1.16.0
	MySQL version: MySQL Community Server - GPL v8.0.16
	PHP Version: 8.1.9
	PHP Memory Limit: 256M
	PHP Max Input Vars: 4000
	PHP Max Post Size: 1000M
	GD Installed: Yes
	ZIP Installed: Yes
	Write Permissions: All right
	Elementor Library: Connected

== WordPress Environment ==
	Version: 6.3.1
	Site URL: http://localhost:10018
	Home URL: http://localhost:10018
	WP Multisite: No
	Max Upload Size: 300 MB
	Memory limit: 40M
	Max Memory limit: 256M
	Permalink Structure: /%postname%/
	Language: en-US
	Timezone: Europe/Brussels
	Debug Mode: Inactive

== Theme ==
	Name: Twenty Twenty-Three
	Version: 1.2
	Author: the WordPress team
	Child Theme: No

== User ==
	Role: administrator
	WP Profile lang: nl_NL
	User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36

== Active Plugins ==
	Elementor
		Version: 3.16.3
		Author: Elementor.com

	Elementor Pro
		Version: 3.16.1
		Author: Elementor.com


== Must-Use Plugins ==
	Ensure admin user isn't deleted
		Version: 1.0
		Author: 

	WP CLI Login Command Server
		Version: 1.3
		Author: Evan Mattson


== Elements Usage ==
	
	container : 1
		button : 1
		container : 30
		heading : 13
		html : 5
		icon : 6
		icon-list : 1
		image : 4
		text-editor : 14
	section : 1
	wp-post : 4
		button : 2
		container : 12
		heading : 21
		icon-box : 3
		image : 13
		text-editor : 29
	wp-page : 15
		button : 24
		container : 176
		heading : 112
		html : 3
		icon : 6
		icon-box : 41
		image : 31
		text-editor : 79
		video : 1


== Settings ==
	
	cpt_support: post, page
	disable_typography_schemes: yes
	allow_tracking: yes
	css_print_method: internal
	unfiltered_files_upload: 1
	font_display: swap
	meta_generator_tag: 1


== Features ==
	Custom Fonts: 2
	Custom Icons: 0

== Integrations ==
	


== Elementor Experiments ==
	Optimized DOM Output: Active
	Improved Asset Loading: Active
	Improved CSS Loading: Active
	Inline Font Icons: Inactive by default
	Additional Custom Breakpoints: Inactive
	admin_menu_rearrangement: Inactive by default
	Flexbox Container: Active
	Upgrade Swiper Library: Active
	Grid Container: Inactive
	Default to New Theme Builder: Active
	Editor Top Bar: Inactive by default
	Landing Pages: Inactive
	Nested Elements: Inactive
	Lazy Load Background Images: Inactive by default
	Global Style Guide: Inactive by default
	Page Transitions: Inactive
	Notes: Inactive
	Form Submissions: Inactive
	Scroll Snap: Inactive
	Menu: Inactive
	Taxonomy Filter: Inactive by default


== Log ==
	
Log: showing 20 of 342023-08-10 03:11:20 [info] elementor::elementor_updater Started 
2023-08-10 03:11:20 [info] Elementor/Upgrades - _on_each_version Start  
2023-08-10 03:11:20 [info] Elementor data updater process has been queued. [array (
  'plugin' => 'Elementor',
  'from' => '3.15.1',
  'to' => '3.15.2',
)]
2023-08-10 03:11:20 [info] Elementor/Upgrades - _on_each_version Finished 
2023-08-10 03:11:20 [info] Elementor data updater process has been completed. [array (
  'plugin' => 'Elementor',
  'from' => '3.15.1',
  'to' => '3.15.2',
)]
2023-08-10 03:11:21 [info] Elementor data updater process has been queued. [array (
  'plugin' => 'Elementor',
  'from' => '3.15.1',
  'to' => '3.15.2',
)]
2023-08-10 03:11:35 [info] Elementor data updater process has been queued. [array (
  'plugin' => 'Elementor Pro',
  'from' => '3.15.0',
  'to' => '3.15.1',
)]
2023-08-10 03:31:38 [info] elementor-pro::elementor_pro_updater Started 
2023-08-10 03:31:38 [info] Elementor Pro/Upgrades - _on_each_version Start  
2023-08-10 03:31:38 [info] Elementor Pro/Upgrades - _on_each_version Finished 
2023-08-10 03:31:38 [info] Elementor data updater process has been completed. [array (
  'plugin' => 'Elementor Pro',
  'from' => '3.15.0',
  'to' => '3.15.1',
)]
2023-09-15 03:42:28 [info] Elementor data updater process has been queued. [array (
  'plugin' => 'Elementor Pro',
  'from' => '3.15.1',
  'to' => '3.16.1',
)]
2023-09-15 03:42:29 [info] elementor-pro::elementor_pro_updater Started 
2023-09-15 03:42:29 [info] Elementor Pro/Upgrades - _on_each_version Start  
2023-09-15 03:42:29 [info] Elementor Pro/Upgrades - _on_each_version Finished 
2023-09-15 03:42:29 [info] Elementor data updater process has been completed. [array (
  'plugin' => 'Elementor Pro',
  'from' => '3.15.1',
  'to' => '3.16.1',
)]
2023-09-15 15:57:02 [info] elementor::elementor_updater Started 
2023-09-15 15:57:02 [info] Elementor/Upgrades - _on_each_version Start  
2023-09-15 15:57:02 [info] Elementor/Upgrades - _on_each_version Finished 
2023-09-15 15:57:02 [info] Elementor data updater process has been completed. [array (
  'plugin' => 'Elementor',
  'from' => '3.15.2',
  'to' => '3.16.3',
)]

PHP: showing 9 of 9PHP: 2023-08-07 13:32:45 [warning X 1][../wp-content/plugins/elementor/app/modules/import-export/module.php::738] Attempt to read property "label" on null [array (
  'trace' => '
#0: Elementor\Core\Logger\Manager -> shutdown()
',
)]
PHP: 2023-08-07 13:32:47 [warning X 1][../wp-content/plugins/elementor/core/common/modules/ajax/module.php::175] Undefined array key "data" [array (
  'trace' => '
#0: Elementor\Core\Logger\Manager -> shutdown()
',
)]
PHP: 2023-08-07 13:32:47 [warning X 2][../wp-content/plugins/elementor-pro/core/app/modules/site-editor/data/endpoints/templates.php::150] Undefined array key "condition_type" [array (
  'trace' => '
#0: ../wp-content/plugins/elementor-pro/core/app/modules/site-editor/data/endpoints/templates.php(150): Elementor\Core\Logger\Manager -> rest_error_handler()
#1: ElementorPro\Core\App\Modules\SiteEditor\Data\Endpoints\Templates -> normalize_template_json_item()
#2: ../wp-content/plugins/elementor-pro/core/app/modules/site-editor/data/endpoints/templates.php(120): class type array_map()
#3: ../wp-content/plugins/elementor-pro/core/app/modules/site-editor/data/endpoints/templates.php(59): ElementorPro\Core\App\Modules\SiteEditor\Data\Endpoints\Templates -> normalize_templates_json()
#4: ../wp-content/plugins/elementor/data/base/endpoint.php(158): ElementorPro\Core\App\Modules\SiteEditor\Data\Endpoints\Templates -> get_items()
',
)]
PHP: 2023-09-15 04:17:35 [error X 49][../wp-content/plugins/elementor-pro/base/base-carousel-trait.php::1385] Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in ../wp-content/plugins/elementor-pro/base/base-carousel-trait.php:1385
Stack trace:
#0 ../wp-content/plugins/elementor-pro/base/base-carousel-trait.php(1385): count(NULL)
#1 ../wp-content/plugins/elementor-pro/base/base-carousel-trait.php(1080): ElementorPro\Modules\LoopBuilder\Widgets\Loop_Carousel->get_num_of_carousel_items(Array)
#2 ../wp-content/plugins/elementor-pro/modules/loop-builder/widgets/loop-carousel.php(140): ElementorPro\Modules\LoopBuilder\Widgets\Loop_Carousel->render_carousel_footer(Array)
#3 ../wp-content/plugins/elementor-pro/modules/loop-builder/skins/skin-loop-base.php(193): ElementorPro\Modules\LoopBuilder\Widgets\Loop_Carousel->render_loop_footer()
#4 ../wp-content/plugins/elementor-pro/modules/posts/skins/skin-base.php(882): ElementorPro\Modules\LoopBuilder\Skins\Skin_Loop_Base->render_loop_footer()
#5 ../wp-content/plugins/elementor-pro/modules/loop-builder/skins/skin-loop-base.php(89): ElementorPro\Modules\Posts\Skins\Skin_Base->render()
#6 ../wp-content/plugins/elementor/includes/base/skin-base.php(79): ElementorPro\Modules\LoopBuilder\Skins\Skin_Loop_Base->render()
#7 ../wp-content/plugins/elementor/includes/base/widget-base.php(607): Elementor\Skin_Base->render_by_mode()
#8 ../wp-content/plugins/elementor/includes/base/widget-base.php(750): Elementor\Widget_Base->render_content()
#9 ../wp-content/plugins/elementor/includes/base/element-base.php(464): Elementor\Widget_Base->print_content()
#10 ../wp-content/plugins/elementor/includes/base/element-base.php(1375): Elementor\Element_Base->print_element()
#11 ../wp-content/plugins/elementor/includes/base/element-base.php(464): Elementor\Element_Base->print_content()
#12 ../wp-content/plugins/elementor/includes/base/element-base.php(1375): Elementor\Element_Base->print_element()
#13 ../wp-content/plugins/elementor/includes/base/element-base.php(464): Elementor\Element_Base->print_content()
#14 ../wp-content/plugins/elementor/core/base/document.php(1739): Elementor\Element_Base->print_element()
#15 ../wp-content/plugins/elementor/core/base/document.php(1134): Elementor\Core\Base\Document->print_elements(Array)
#16 ../wp-content/plugins/elementor/includes/frontend.php(1179): Elementor\Core\Base\Document->print_elements_with_wrapper(Array)
#17 ../wp-content/plugins/elementor/includes/frontend.php(1074): Elementor\Frontend->get_builder_content(2)
#18 ../wp-includes/class-wp-hook.php(310): Elementor\Frontend->apply_builder_in_content('<h1>We grow you...')
#19 ../wp-includes/plugin.php(205): WP_Hook->apply_filters('<h1>We grow you...', Array)
#20 ../wp-includes/post-template.php(256): apply_filters('the_content', '<h1>We grow you...')
#21 ../wp-content/themes/hello-elementor/template-parts/single.php(25): the_content()
#22 ../wp-includes/template.php(787): require('/data/sites/web...')
#23 ../wp-includes/template.php(720): load_template('/data/sites/web...', false, Array)
#24 ../wp-includes/general-template.php(206): locate_template(Array, true, false, Array)
#25 ../wp-content/themes/hello-elementor/index.php(21): get_template_part('template-parts/...')
#26 ../wp-includes/template-loader.php(106): include('/data/sites/web...')
#27 ../wp-blog-header.php(19): require_once('/data/sites/web...')
#28 ../index.php(17): require('/data/sites/web...')
#29 {main}
  thrown [array (
  'trace' => '
#0: Elementor\Core\Logger\Manager -> shutdown()
',
)]
PHP: 2023-09-15 15:58:22 [warning X 2][../wp-content/plugins/elementor-pro/base/base-carousel-trait.php::1385] Undefined array key "carousel_items" [array (
  'trace' => '
#0: ../wp-content/plugins/elementor-pro/base/base-carousel-trait.php(1385): Elementor\Core\Logger\Manager -> rest_error_handler()
#1: ../wp-content/plugins/elementor-pro/base/base-carousel-trait.php(1080): ElementorPro\Modules\LoopBuilder\Widgets\Loop_Carousel -> get_num_of_carousel_items()
#2: ../wp-content/plugins/elementor-pro/modules/loop-builder/widgets/loop-carousel.php(140): ElementorPro\Modules\LoopBuilder\Widgets\Loop_Carousel -> render_carousel_footer()
#3: ../wp-content/plugins/elementor-pro/modules/loop-builder/skins/skin-loop-base.php(193): ElementorPro\Modules\LoopBuilder\Widgets\Loop_Carousel -> render_loop_footer()
#4: ../wp-content/plugins/elementor-pro/modules/posts/skins/skin-base.php(882): ElementorPro\Modules\LoopBuilder\Skins\Skin_Loop_Base -> render_loop_footer()
',
)]
PHP: 2023-09-15 15:58:23 [error X 2][../wp-content/plugins/elementor-pro/base/base-carousel-trait.php::1385] Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in ../wp-content/plugins/elementor-pro/base/base-carousel-trait.php:1385
Stack trace:
#0 ../wp-content/plugins/elementor-pro/base/base-carousel-trait.php(1385): count(NULL)
#1 ../wp-content/plugins/elementor-pro/base/base-carousel-trait.php(1080): ElementorPro\Modules\LoopBuilder\Widgets\Loop_Carousel->get_num_of_carousel_items(Array)
#2 ../wp-content/plugins/elementor-pro/modules/loop-builder/widgets/loop-carousel.php(140): ElementorPro\Modules\LoopBuilder\Widgets\Loop_Carousel->render_carousel_footer(Array)
#3 ../wp-content/plugins/elementor-pro/modules/loop-builder/skins/skin-loop-base.php(193): ElementorPro\Modules\LoopBuilder\Widgets\Loop_Carousel->render_loop_footer()
#4 ../wp-content/plugins/elementor-pro/modules/posts/skins/skin-base.php(882): ElementorPro\Modules\LoopBuilder\Skins\Skin_Loop_Base->render_loop_footer()
#5 ../wp-content/plugins/elementor-pro/modules/loop-builder/skins/skin-loop-base.php(89): ElementorPro\Modules\Posts\Skins\Skin_Base->render()
#6 ../wp-content/plugins/elementor/includes/base/skin-base.php(79): ElementorPro\Modules\LoopBuilder\Skins\Skin_Loop_Base->render()
#7 ../wp-content/plugins/elementor/includes/base/widget-base.php(607): Elementor\Skin_Base->render_by_mode()
#8 ../wp-content/plugins/elementor/includes/base/widget-base.php(733): Elementor\Widget_Base->render_content()
#9 ../wp-content/plugins/elementor/includes/base/element-base.php(551): Elementor\Widget_Base->get_raw_data(true)
#10 ../wp-content/plugins/elementor/includes/base/element-base.php(551): Elementor\Element_Base->get_raw_data(true)
#11 ../wp-content/plugins/elementor/core/base/document.php(1013): Elementor\Element_Base->get_raw_data(true)
#12 ../wp-content/plugins/elementor/core/base/document.php(679): Elementor\Core\Base\Document->get_elements_raw_data(Array, true)
#13 ../wp-content/plugins/elementor/includes/base/controls-stack.php(1010): Elementor\Core\Base\Document->get_initial_config()
#14 ../wp-content/plugins/elementor/core/editor/loader/common/editor-common-scripts-settings.php(33): Elementor\Controls_Stack->get_config()
#15 ../wp-content/plugins/elementor/core/editor/loader/v1/editor-v1-loader.php(76): Elementor\Core\Editor\Loader\Common\Editor_Common_Scripts_Settings::get()
#16 ../wp-content/plugins/elementor/core/editor/editor.php(358): Elementor\Core\Editor\Loader\V1\Editor_V1_Loader->enqueue_scripts()
#17 ../wp-includes/class-wp-hook.php(310): Elementor\Core\Editor\Editor->enqueue_scripts('')
#18 ../wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters('', Array)
#19 ../wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#20 ../wp-includes/script-loader.php(2225): do_action('wp_enqueue_scri...')
#21 ../wp-includes/class-wp-hook.php(310): wp_enqueue_scripts('')
#22 ../wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters('', Array)
#23 ../wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#24 ../wp-includes/general-template.php(3053): do_action('wp_head')
#25 ../wp-content/plugins/elementor/includes/editor-templates/editor-wrapper.php(31): wp_head()
#26 ../wp-content/plugins/elementor/core/editor/loader/v1/editor-v1-loader.php(110): include('/data/sites/web...')
#27 ../wp-content/plugins/elementor/core/editor/editor.php(163): Elementor\Core\Editor\Loader\V1\Editor_V1_Loader->print_root_template()
#28 ../wp-includes/class-wp-hook.php(310): Elementor\Core\Editor\Editor->init('')
#29 ../wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters('', Array)
#30 ../wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#31 ../wp-admin/admin.php(419): do_action('admin_action_el...')
#32 ../wp-admin/post.php(12): require_once('/data/sites/web...')
#33 {main}
  thrown [array (
  'trace' => '
#0: Elementor\Core\Logger\Manager -> shutdown()
',
)]
PHP: 2023-09-15 16:32:15 [error X 5][../wp-content/plugins/elementor-pro/base/base-carousel-trait.php::1385] Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in ../wp-content/plugins/elementor-pro/base/base-carousel-trait.php:1385
Stack trace:
#0 ../wp-content/plugins/elementor-pro/base/base-carousel-trait.php(1385): count(NULL)
#1 ../wp-content/plugins/elementor-pro/base/base-carousel-trait.php(1080): ElementorPro\Modules\LoopBuilder\Widgets\Loop_Carousel->get_num_of_carousel_items(Array)
#2 ../wp-content/plugins/elementor-pro/modules/loop-builder/widgets/loop-carousel.php(140): ElementorPro\Modules\LoopBuilder\Widgets\Loop_Carousel->render_carousel_footer(Array)
#3 ../wp-content/plugins/elementor-pro/modules/loop-builder/skins/skin-loop-base.php(193): ElementorPro\Modules\LoopBuilder\Widgets\Loop_Carousel->render_loop_footer()
#4 ../wp-content/plugins/elementor-pro/modules/posts/skins/skin-base.php(882): ElementorPro\Modules\LoopBuilder\Skins\Skin_Loop_Base->render_loop_footer()
#5 ../wp-content/plugins/elementor-pro/modules/loop-builder/skins/skin-loop-base.php(89): ElementorPro\Modules\Posts\Skins\Skin_Base->render()
#6 ../wp-content/plugins/elementor/includes/base/skin-base.php(79): ElementorPro\Modules\LoopBuilder\Skins\Skin_Loop_Base->render()
#7 ../wp-content/plugins/elementor/includes/base/widget-base.php(607): Elementor\Skin_Base->render_by_mode()
#8 ../wp-content/plugins/elementor/includes/base/widget-base.php(750): Elementor\Widget_Base->render_content()
#9 ../wp-content/plugins/elementor/includes/base/element-base.php(464): Elementor\Widget_Base->print_content()
#10 ../wp-content/plugins/elementor/includes/base/element-base.php(1375): Elementor\Element_Base->print_element()
#11 ../wp-content/plugins/elementor/includes/base/element-base.php(464): Elementor\Element_Base->print_content()
#12 ../wp-content/plugins/elementor/includes/base/element-base.php(1375): Elementor\Element_Base->print_element()
#13 ../wp-content/plugins/elementor/includes/base/element-base.php(464): Elementor\Element_Base->print_content()
#14 ../wp-content/plugins/elementor/core/base/document.php(1739): Elementor\Element_Base->print_element()
#15 ../wp-content/plugins/elementor/core/base/document.php(1134): Elementor\Core\Base\Document->print_elements(Array)
#16 ../wp-content/plugins/elementor/includes/frontend.php(1179): Elementor\Core\Base\Document->print_elements_with_wrapper(Array)
#17 ../wp-content/plugins/elementor/includes/frontend.php(1074): Elementor\Frontend->get_builder_content(2)
#18 ../wp-includes/class-wp-hook.php(308): Elementor\Frontend->apply_builder_in_content('<h1>We grow you...')
#19 ../wp-includes/plugin.php(205): WP_Hook->apply_filters('<h1>We grow you...', Array)
#20 ../wp-includes/post-template.php(255): apply_filters('the_content', '<h1>We grow you...')
#21 ../wp-content/themes/hello-elementor/template-parts/single.php(25): the_content()
#22 ../wp-includes/template.php(785): require('/Users/x...')
#23 ../wp-includes/template.php(718): load_template('/Users/x...', false, Array)
#24 ../wp-includes/general-template.php(204): locate_template(Array, true, false, Array)
#25 ../wp-content/themes/hello-elementor/index.php(21): get_template_part('template-parts/...')
#26 ../wp-includes/template-loader.php(106): include('/Users/x...')
#27 ../wp-blog-header.php(19): require_once('/Users/x...')
#28 ../index.php(17): require('/Users/x...')
#29 {main}
  thrown [array (
  'trace' => '
#0: Elementor\Core\Logger\Manager -> shutdown()
',
)]
PHP: 2023-09-15 16:34:06 [error X 1][../wp-content/plugins/elementor-pro/base/base-carousel-trait.php::1385] Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in ../wp-content/plugins/elementor-pro/base/base-carousel-trait.php:1385
Stack trace:
#0 ../wp-content/plugins/elementor-pro/base/base-carousel-trait.php(1385): count(NULL)
#1 ../wp-content/plugins/elementor-pro/base/base-carousel-trait.php(1080): ElementorPro\Modules\LoopBuilder\Widgets\Loop_Carousel->get_num_of_carousel_items(Array)
#2 ../wp-content/plugins/elementor-pro/modules/loop-builder/widgets/loop-carousel.php(140): ElementorPro\Modules\LoopBuilder\Widgets\Loop_Carousel->render_carousel_footer(Array)
#3 ../wp-content/plugins/elementor-pro/modules/loop-builder/skins/skin-loop-base.php(193): ElementorPro\Modules\LoopBuilder\Widgets\Loop_Carousel->render_loop_footer()
#4 ../wp-content/plugins/elementor-pro/modules/posts/skins/skin-base.php(882): ElementorPro\Modules\LoopBuilder\Skins\Skin_Loop_Base->render_loop_footer()
#5 ../wp-content/plugins/elementor-pro/modules/loop-builder/skins/skin-loop-base.php(89): ElementorPro\Modules\Posts\Skins\Skin_Base->render()
#6 ../wp-content/plugins/elementor/includes/base/skin-base.php(79): ElementorPro\Modules\LoopBuilder\Skins\Skin_Loop_Base->render()
#7 ../wp-content/plugins/elementor/includes/base/widget-base.php(607): Elementor\Skin_Base->render_by_mode()
#8 ../wp-content/plugins/elementor/includes/base/widget-base.php(750): Elementor\Widget_Base->render_content()
#9 ../wp-content/plugins/elementor/includes/base/element-base.php(464): Elementor\Widget_Base->print_content()
#10 ../wp-content/plugins/elementor/includes/base/element-base.php(1375): Elementor\Element_Base->print_element()
#11 ../wp-content/plugins/elementor/includes/base/element-base.php(464): Elementor\Element_Base->print_content()
#12 ../wp-content/plugins/elementor/includes/base/element-base.php(1375): Elementor\Element_Base->print_element()
#13 ../wp-content/plugins/elementor/includes/base/element-base.php(464): Elementor\Element_Base->print_content()
#14 ../wp-content/plugins/elementor/core/base/document.php(1739): Elementor\Element_Base->print_element()
#15 ../wp-content/plugins/elementor/core/base/document.php(1134): Elementor\Core\Base\Document->print_elements(Array)
#16 ../wp-content/plugins/elementor/includes/frontend.php(1179): Elementor\Core\Base\Document->print_elements_with_wrapper(Array)
#17 ../wp-content/plugins/elementor/includes/frontend.php(1074): Elementor\Frontend->get_builder_content(2)
#18 ../wp-includes/class-wp-hook.php(310): Elementor\Frontend->apply_builder_in_content('<h1>We grow you...')
#19 ../wp-includes/plugin.php(205): WP_Hook->apply_filters('<h1>We grow you...', Array)
#20 ../wp-includes/post-template.php(256): apply_filters('the_content', '<h1>We grow you...')
#21 ../wp-content/themes/hello-elementor/template-parts/single.php(25): the_content()
#22 ../wp-includes/template.php(787): require('/Users/x...')
#23 ../wp-includes/template.php(720): load_template('/Users/x...', false, Array)
#24 ../wp-includes/general-template.php(206): locate_template(Array, true, false, Array)
#25 ../wp-content/themes/hello-elementor/index.php(21): get_template_part('template-parts/...')
#26 ../wp-includes/template-loader.php(106): include('/Users/x...')
#27 ../wp-blog-header.php(19): require_once('/Users/x...')
#28 ../index.php(17): require('/Users/x...')
#29 {main}
  thrown [array (
  'trace' => '
#0: Elementor\Core\Logger\Manager -> shutdown()
',
)]
PHP: 2023-09-15 16:37:43 [error X 1][../wp-content/plugins/elementor-pro/base/base-carousel-trait.php::1385] Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in ../wp-content/plugins/elementor-pro/base/base-carousel-trait.php:1385
Stack trace:
#0 ../wp-content/plugins/elementor-pro/base/base-carousel-trait.php(1385): count(NULL)
#1 ../wp-content/plugins/elementor-pro/base/base-carousel-trait.php(1080): ElementorPro\Modules\LoopBuilder\Widgets\Loop_Carousel->get_num_of_carousel_items(Array)
#2 ../wp-content/plugins/elementor-pro/modules/loop-builder/widgets/loop-carousel.php(140): ElementorPro\Modules\LoopBuilder\Widgets\Loop_Carousel->render_carousel_footer(Array)
#3 ../wp-content/plugins/elementor-pro/modules/loop-builder/skins/skin-loop-base.php(193): ElementorPro\Modules\LoopBuilder\Widgets\Loop_Carousel->render_loop_footer()
#4 ../wp-content/plugins/elementor-pro/modules/posts/skins/skin-base.php(882): ElementorPro\Modules\LoopBuilder\Skins\Skin_Loop_Base->render_loop_footer()
#5 ../wp-content/plugins/elementor-pro/modules/loop-builder/skins/skin-loop-base.php(89): ElementorPro\Modules\Posts\Skins\Skin_Base->render()
#6 ../wp-content/plugins/elementor/includes/base/skin-base.php(79): ElementorPro\Modules\LoopBuilder\Skins\Skin_Loop_Base->render()
#7 ../wp-content/plugins/elementor/includes/base/widget-base.php(607): Elementor\Skin_Base->render_by_mode()
#8 ../wp-content/plugins/elementor/includes/base/widget-base.php(750): Elementor\Widget_Base->render_content()
#9 ../wp-content/plugins/elementor/includes/base/element-base.php(464): Elementor\Widget_Base->print_content()
#10 ../wp-content/plugins/elementor/includes/base/element-base.php(1375): Elementor\Element_Base->print_element()
#11 ../wp-content/plugins/elementor/includes/base/element-base.php(464): Elementor\Element_Base->print_content()
#12 ../wp-content/plugins/elementor/includes/base/element-base.php(1375): Elementor\Element_Base->print_element()
#13 ../wp-content/plugins/elementor/includes/base/element-base.php(464): Elementor\Element_Base->print_content()
#14 ../wp-content/plugins/elementor/core/base/document.php(1739): Elementor\Element_Base->print_element()
#15 ../wp-content/plugins/elementor/core/base/document.php(1134): Elementor\Core\Base\Document->print_elements(Array)
#16 ../wp-content/plugins/elementor/includes/frontend.php(1179): Elementor\Core\Base\Document->print_elements_with_wrapper(Array)
#17 ../wp-content/plugins/elementor/includes/frontend.php(1074): Elementor\Frontend->get_builder_content(2)
#18 ../wp-includes/class-wp-hook.php(310): Elementor\Frontend->apply_builder_in_content('<h1>We grow you...')
#19 ../wp-includes/plugin.php(205): WP_Hook->apply_filters('<h1>We grow you...', Array)
#20 ../wp-includes/blocks/post-content.php(54): apply_filters('the_content', '<h1>We grow you...')
#21 ../wp-includes/class-wp-block.php(258): render_block_core_post_content(Array, '<h1>We grow you...', Object(WP_Block))
#22 ../wp-includes/class-wp-block.php(244): WP_Block->render()
#23 ../wp-includes/blocks.php(1133): WP_Block->render()
#24 ../wp-includes/blocks.php(1171): render_block(Array)
#25 ../wp-includes/block-template.php(231): do_blocks('<!-- wp:templat...')
#26 ../wp-includes/template-canvas.php(12): get_the_block_template_html()
#27 ../wp-includes/template-loader.php(106): include('/Users/x...')
#28 ../wp-blog-header.php(19): require_once('/Users/x...')
#29 ../index.php(17): require('/Users/x...')
#30 {main}
  thrown [array (
  'trace' => '
#0: Elementor\Core\Logger\Manager -> shutdown()
',
)]



== Elementor - Compatibility Tag ==
	
	Elementor Pro: Compatible

== Elementor Pro - Compatibility Tag ==
	


@bobhuf bobhuf added the status/awaiting_triage Indicates when an Issue, Pull Request, or Discussion awaits to be triaged. label Sep 15, 2023
@ThoMich22
Copy link

ThoMich22 commented Sep 15, 2023

Same issue here.. I have rolled back to update version 3.15.1 for Elementor and Elementor Pro and regenerate CSS to resolve the problem.

@MikeLikesThat
Copy link

MikeLikesThat commented Sep 16, 2023

This issue is a duplicate of: #23804

There is a new field in the widget to enter how many posts to show. If left blank it will show this "undefined aray" error. Update Elementor and then add a number. This is what resolved it for me.

An idea to fix this is for Elementor to force a default fallback number of 6 or 10.

PHP 8+ compounds the issue where elements do not load placed after the widget. PHP 7.4 shows the error but still loads widgets placed after it.

@bobhuf
Copy link
Author

bobhuf commented Sep 16, 2023

I can't even try your solution because this error breaks the editor too.

@nicholaszein nicholaszein changed the title PHP Fatal error "base-carousel-trait.php" πŸ”— 🐞 Bug Report: Carousel throws PHP Fatal error if the Number of Slides control is empty "base-carousel-trait.php" (Duplicate of #23804) Sep 17, 2023
@nicholaszein nicholaszein added bug Indicates a bug with one or multiple components. product/pro Indicates if the referenced component is part of the Elementor Pro plugin. component/code Indicates when a topic is related to a component’s code. compatibility/assets Indicates a compatibility problem with scripts or CSS. widget/loop-builder/carousel References the Loop Carousel (Pro) nested widget. mod* widget/nested/carousel References the (nested) Carousel widget. and removed status/awaiting_triage Indicates when an Issue, Pull Request, or Discussion awaits to be triaged. labels Sep 17, 2023
@nicholaszein
Copy link
Member

Hello!

Thank you for your submission! πŸ™

πŸ”— 🐞 This issue is a Duplicate of #23804

Which is on the same subject.

For this reason, I'm closing this thread and πŸ”ƒ Merging it with the original, so we can have all the discussions in one location, and deal with it more efficiently.

Feel free to continue the conversation there. πŸ˜‰

πŸ” Please, in the future, remember to check if there isn't any thread similar to yours already opened.

Kind regards

@nicholaszein nicholaszein closed this as not planned Won't fix, can't repro, duplicate, stale Sep 17, 2023
@elementor elementor locked and limited conversation to collaborators Sep 17, 2023
@nicholaszein nicholaszein changed the title πŸ”— 🐞 Bug Report: Carousel throws PHP Fatal error if the Number of Slides control is empty "base-carousel-trait.php" (Duplicate of #23804) πŸ”— 🐞 Bug Report: Loop Carousel throws Fatal Error if the Number of Slides control is empty "base-carousel-trait.php" (Duplicate of #23804) Sep 17, 2023
@nicholaszein nicholaszein removed the widget/nested/carousel References the (nested) Carousel widget. label Sep 17, 2023
@nicholaszein nicholaszein changed the title πŸ”— 🐞 Bug Report: Loop Carousel throws Fatal Error if the Number of Slides control is empty "base-carousel-trait.php" (Duplicate of #23804) βœ… πŸ”— 🐞 Bug Report: Loop Carousel throws Fatal Error if the Number of Slides control is empty "base-carousel-trait.php" (Duplicate of #23804) Sep 21, 2023
@nicholaszein nicholaszein added status/merged Indicates when a Pull Request has been merged to a Release. solved Indicates that an Issue has been Solved, or a Feature Request has been Released. labels Sep 21, 2023
@nicholaszein nicholaszein added this to the 3.16.0 milestone Sep 21, 2023
@nicholaszein
Copy link
Member

Hey @bobhuf!

πŸ“’ We're happy to announce that the issue you raised was resolved in Elementor Pro v3.16.2! πŸ₯³

βœ… Feel free to check it out and update your plugin to the new version!

Check the changelog for more information:
Changelog of Elementor and Elementor Pro

Cheers πŸ₯‚

@nicholaszein nicholaszein added the duplicate Indicates when an Issue or a Discussion is a duplicate of another Issue or Discussion. label Apr 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Indicates a bug with one or multiple components. compatibility/assets Indicates a compatibility problem with scripts or CSS. component/code Indicates when a topic is related to a component’s code. duplicate Indicates when an Issue or a Discussion is a duplicate of another Issue or Discussion. mod* product/pro Indicates if the referenced component is part of the Elementor Pro plugin. solved Indicates that an Issue has been Solved, or a Feature Request has been Released. status/merged Indicates when a Pull Request has been merged to a Release. widget/loop-builder/carousel References the Loop Carousel (Pro) nested widget.
Projects
None yet
Development

No branches or pull requests

4 participants