Settings page with images giving errors

Support Meta Box AIO Settings page with images giving errors

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #50021
    info@ivanit.nl[email protected]
    Participant

    I created a settings page where the client can add images for her homepage.
    Custom fields used: Single image and Image advanced

    The homepage is made with elementor.

    When updating to Elementor latest version, the homepage does not work anymore:

    Fatal error: Uncaught TypeError: Unsupported operand types: string + int in /var/www/html/public/wp-content/plugins/elementor/includes/widgets/image-carousel.php:976 Stack trace: #0 /var/www/html/public/wp-content/plugins/elementor/includes/base/controls-stack.php(2374): Elementor\Widget_Image_Carousel->render() #1 /var/www/html/public/wp-content/plugins/elementor/includes/base/widget-base.php(636): Elementor\Controls_Stack->render_by_mode() #2 /var/www/html/public/wp-content/plugins/elementor/includes/base/widget-base.php(782): Elementor\Widget_Base->render_content() #3 /var/www/html/public/wp-content/plugins/elementor/includes/base/element-base.php(514): Elementor\Widget_Base->print_content() #4 /var/www/html/public/wp-content/plugins/elementor/modules/element-cache/module.php(71): Elementor\Element_Base->print_element() #5 /var/www/html/public/wp-includes/shortcodes.php(434): Elementor\Modules\ElementCache\Module->Elementor\Modules\ElementCache\{closure}() #6 [internal function]: do_shortcode_tag() #7 /var/www/html/public/wp-includes/shortcodes.php(273): preg_replace_callback() #8 /var/www/html/public/wp-content/plugins/elementor/core/base/document.php(1888): do_shortcode() #9 /var/www/html/public/wp-content/plugins/elementor/core/base/document.php(1221): Elementor\Core\Base\Document->print_elements() #10 /var/www/html/public/wp-content/plugins/elementor/includes/frontend.php(1223): Elementor\Core\Base\Document->print_elements_with_wrapper() #11 /var/www/html/public/wp-content/plugins/elementor/includes/frontend.php(1105): Elementor\Frontend->get_builder_content() #12 /var/www/html/public/wp-includes/class-wp-hook.php(341): Elementor\Frontend->apply_builder_in_content() #13 /var/www/html/public/wp-includes/plugin.php(205): WP_Hook->apply_filters() #14 /var/www/html/public/wp-includes/post-template.php(256): apply_filters() #15 /var/www/html/public/wp-content/themes/kadence/template-parts/content/entry_content.php(16): the_content() #16 /var/www/html/public/wp-includes/template.php(816): require('...') #17 /var/www/html/public/wp-includes/template.php(749): load_template() #18 /var/www/html/public/wp-includes/general-template.php(206): locate_template() #19 /var/www/html/public/wp-content/themes/kadence/template-parts/content/single-entry.php(28): get_template_part() #20 /var/www/html/public/wp-includes/template.php(816): require('...') #21 /var/www/html/public/wp-includes/template.php(749): load_template() #22 /var/www/html/public/wp-includes/general-template.php(206): locate_template() #23 /var/www/html/public/wp-content/themes/kadence/inc/template-functions/single-functions.php(27): get_template_part() #24 /var/www/html/public/wp-includes/class-wp-hook.php(341): Kadence\single_content() #25 /var/www/html/public/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters() #26 /var/www/html/public/wp-includes/plugin.php(522): WP_Hook->do_action() #27 /var/www/html/public/wp-content/themes/kadence/template-parts/content/single.php(34): do_action() #28 /var/www/html/public/wp-includes/template.php(816): require('...') #29 /var/www/html/public/wp-includes/template.php(749): load_template() #30 /var/www/html/public/wp-includes/general-template.php(206): locate_template() #31 /var/www/html/public/wp-content/themes/kadence/inc/template-functions/single-functions.php(20): get_template_part() #32 /var/www/html/public/wp-includes/class-wp-hook.php(341): Kadence\single_markup() #33 /var/www/html/public/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters() #34 /var/www/html/public/wp-includes/plugin.php(522): WP_Hook->do_action() #35 /var/www/html/public/wp-content/themes/kadence/page.php(20): do_action() #36 /var/www/html/public/wp-includes/template-loader.php(132): include('...') #37 /var/www/html/public/wp-blog-header.php(19): require_once('...') #38 /var/www/html/public/index.php(17): require('...') #39 {main} thrown in /var/www/html/public/wp-content/plugins/elementor/includes/widgets/image-carousel.php on line 976

    When using an older Elementor version it does work (in this case: Elementor V. 3.35.7 and Pro V. 3.35.1 ).

    I duplicated the homepage, kept all the images, but removed the dynamic data connection to the settings page and then the page does work without a problem. So it has something to do with the dynamic data send by Metabox.

    How can this be fixed?

    #50026
    PeterPeter
    Moderator

    Hello,

    I'm using Elementor 4.1.1, Elementor Pro 4.1.0, Meta Box AIO 3.7.1 and not able to reproduce the issue. Here are steps I take on my demo site:
    - create a settings page and add custom fields to the settings page: single image and image advanced
    - create a post, edit it with Elementor
    - add widgets Image, Gallery
    - use the Dynamic Tags and get the field value from the settings page
    - save changes and visit the post in the frontend

    Based on your error log, I see that it is related to the Kadence theme. Can you please deactivate all plugins except Meta Box AIO, Elementor plugins, switch to a WordPress theme and recheck the issue?

    #50030
    info@ivanit.nl[email protected]
    Participant

    Hi Peter, thank you for your help.

    Converted the website to a test environment, disabled everything except: Elementor, Elementor Pro, Metabox AIO. Changed theme to Twenty Twenty-Five.
    Removed all photo's from the settings page and replaced all with a different image with a standard name (so it is not the name of the image or the image is a problem).
    Created a new page with Elementor.
    Added Image widget and dynamic image: it works.
    Added Gallery widget and dynamic images: error
    Added Gallery widget and selected the same images: it works
    Added image carrousel widget and dynamic images: error
    Added image carrousel widget and selected the same images: it works

    When editing the page, there is no problem, when viewing front end, I get errors like above when enabeling debug.

    Did another test: new install WordPress, Elementor, Elementor Pro, Metabox AIO. Same test as above, same result.

    Reverting Elementor and pro to older version fixes the problem.

    #50031
    info@ivanit.nl[email protected]
    Participant

    Last test: I changed server from Apache to Litespeed, clean install: same result.

    #50035
    PeterPeter
    Moderator

    Hello,

    Please share your site admin account and FTP by submitting this contact form https://metabox.io/contact/

    I will take a look. Thank you.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.