Home Forums WoodMart support forum Fatal error editing HTML block through elementor

Fatal error editing HTML block through elementor

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #426934

    Kas
    Participant

    Hello,

    My site uses woodmart layouts to create the single product view. In it some parts are created from HTML block shortcode. Recently trying to edit HTML block throws a fatal error.

    It only happens to one HTML block. Weird thing is that just a couple of days ago everything was working fine. Also on the front end nothing is broken, I just can’t edit the block in CMS.

    For testing purposes, I duplicated the HTML block in question https://platinum.psdev.lv/wp-admin/post.php?post=16165&action=edit.

    In DB removing element “wd_products” (“elements”:[],”widgetType”:”wd_products”}) from posts _elementor_data I no longer get the fatal error. So I suspect that the problem comes from there.

    What is causing this issue and how do I get my content back?

    The fatal error:

    [07-Dec-2022 08:41:15 UTC] PHP Fatal error:  Uncaught Error: Call to a member function get_type() on bool in /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-content/plugins/woocommerce/includes/wc-template-functions.php:1688
    Stack trace:
    #0 /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-content/themes/woodmart/inc/modules/layouts/elementor/single-product/class-add-to-cart.php(356): woocommerce_template_single_add_to_cart()
    #1 /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-content/plugins/elementor/includes/base/controls-stack.php(2266): XTS\Modules\Layouts\Add_To_Cart->render()
    #2 /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-content/plugins/elementor/includes/base/widget-base.php(609): Elementor\Controls_Stack->render_by_mode()
    #3 /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-content/plugins/elementor/includes/base/widget-base.php(733): Elementor\Widget_Base->render_content()
    #4 /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-content/plugins/elementor/includes/base/element-base.php(534): Elementor\Widget_Base->get_raw_data()
    #5 /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-content/plugins/elementor/includes/base/element-base.php(534): Elementor\Element_Base->get_raw_data()
    #6 /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-content/plugins/elementor/core/base/document.php(958): Elementor\Element_Base->get_raw_data()
    #7 /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-content/plugins/elementor/core/base/document.php(632): Elementor\Core\Base\Document->get_elements_raw_data()
    #8 /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-content/plugins/elementor/includes/base/controls-stack.php(1019): Elementor\Core\Base\Document->get_initial_config()
    #9 /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-content/plugins/elementor/core/editor/editor.php(527): Elementor\Controls_Stack->get_config()
    #10 /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-includes/class-wp-hook.php(308): Elementor\Core\Editor\Editor->enqueue_scripts()
    #11 /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    #12 /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action()
    #13 /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-includes/script-loader.php(2180): do_action()
    #14 /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-includes/class-wp-hook.php(308): wp_enqueue_scripts()
    #15 /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    #16 /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action()
    #17 /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-includes/general-template.php(3043): do_action()
    #18 /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-content/plugins/elementor/includes/editor-templates/editor-wrapper.php(31): wp_head()
    #19 /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-content/plugins/elementor/core/editor/editor.php(322): include('...')
    #20 /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-content/plugins/elementor/core/editor/editor.php(163): Elementor\Core\Editor\Editor->print_editor_template()
    #21 /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-includes/class-wp-hook.php(308): Elementor\Core\Editor\Editor->init()
    #22 /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    #23 /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action()
    #24 /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-admin/admin.php(419): do_action()
    #25 /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-admin/post.php(12): require_once('...')
    #26 {main}
      thrown in /var/www/vhosts/platinum.psdev.lv/httpdocs/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1688 
    Attachments:
    You must be logged in to view attached files.
    #426942

    Artem Temos
    Keymaster

    Hello,

    Make sure that you don’t have any elements from the Layouts builder inside your HTML block. Such elements can be used in WoodMart -> Layouts only.

    Kind Regards

    #427080

    Kas
    Participant

    Yes, the problem was with one of the elements that can only be in layouts. My issue is fixed. Thank you.

    #427097

    Artem Temos
    Keymaster

    Great, we are glad that you sorted it out. Feel free to contact us if you have any further questions.

    Kind Regards

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Fatal error editing HTML block through elementor’ is closed to new replies.