Home › Forums › WoodMart support forum › Can’t edit the layout custom post type on foreign language
Can’t edit the layout custom post type on foreign language
- This topic has 6 replies, 2 voices, and was last updated 1 year, 1 month ago by
bathorimatyas.
-
AuthorPosts
-
January 24, 2024 at 3:42 pm #533127
bathorimatyasParticipantDear Xtemos!
If i edit the english version of layout structure of single product pages, then Elementor loads successfully, but when i try to edit the same element of hungarian version i get a fatal error.
Please help, how to fix it…
`Fatal error: Uncaught Error: Call to a member function get_gallery_image_ids() on null in C:\xampp\htdocs\vtcrestrict\wp-content\themes\woodmart\woocommerce\single-product\product-image.php:27 Stack trace: #0 C:\xampp\htdocs\vtcrestrict\wp-content\plugins\woocommerce\includes\wc-core-functions.php(345): include() #1 C:\xampp\htdocs\vtcrestrict\wp-content\themes\woodmart\inc\modules\layouts\elementor\single-product\class-gallery.php(415): wc_get_template(‘single-product/…’, Array) #2 C:\xampp\htdocs\vtcrestrict\wp-content\plugins\elementor\includes\base\controls-stack.php(2297): XTS\Modules\Layouts\Gallery->render() #3 C:\xampp\htdocs\vtcrestrict\wp-content\plugins\elementor\includes\base\widget-base.php(614): Elementor\Controls_Stack->render_by_mode() #4 C:\xampp\htdocs\vtcrestrict\wp-content\plugins\elementor\includes\base\widget-base.php(738): Elementor\Widget_Base->render_content() #5 C:\xampp\htdocs\vtcrestrict\wp-content\plugins\elementor\includes\base\element-base.php(551): Elementor\Widget_Base->get_raw_data(true) #6 C:\xampp\htdocs\vtcrestrict\wp-content\plugins\elementor\includes\base\element-base.php(551): Elementor\Element_Base->get_raw_data(true) #7 C:\xampp\htdocs\vtcrestrict\wp-content\plugins\elementor\core\base\document.php(1023): Elementor\Element_Base->get_raw_data(true) #8 C:\xampp\htdocs\vtcrestrict\wp-content\plugins\elementor\core\base\document.php(679): Elementor\Core\Base\Document->get_elements_raw_data(Array, true) #9 C:\xampp\htdocs\vtcrestrict\wp-content\plugins\elementor\includes\base\controls-stack.php(1042): Elementor\Core\Base\Document->get_initial_config() #10 C:\xampp\htdocs\vtcrestrict\wp-content\plugins\elementor\core\editor\loader\common\editor-common-scripts-settings.php(34): Elementor\Controls_Stack->get_config() #11 C:\xampp\htdocs\vtcrestrict\wp-content\plugins\elementor\core\editor\loader\v1\editor-v1-loader.php(76): Elementor\Core\Editor\Loader\Common\Editor_Common_Scripts_Settings::get() #12 C:\xampp\htdocs\vtcrestrict\wp-content\plugins\elementor\core\editor\editor.php(358): Elementor\Core\Editor\Loader\V1\Editor_V1_Loader->enqueue_scripts() #13 C:\xampp\htdocs\vtcrestrict\wp-includes\class-wp-hook.php(324): Elementor\Core\Editor\Editor->enqueue_scripts(”) #14 C:\xampp\htdocs\vtcrestrict\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters(”, Array) #15 C:\xampp\htdocs\vtcrestrict\wp-includes\plugin.php(517): WP_Hook->do_action(Array) #16 C:\xampp\htdocs\vtcrestrict\wp-includes\script-loader.php(2262): do_action(‘wp_enqueue_scri…’) #17 C:\xampp\htdocs\vtcrestrict\wp-includes\class-wp-hook.php(324): wp_enqueue_scripts(”) #18 C:\xampp\htdocs\vtcrestrict\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters(”, Array) #19 C:\xampp\htdocs\vtcrestrict\wp-includes\plugin.php(517): WP_Hook->do_action(Array) #20 C:\xampp\htdocs\vtcrestrict\wp-includes\general-template.php(3052): do_action(‘wp_head’) #21 C:\xampp\htdocs\vtcrestrict\wp-content\plugins\elementor\includes\editor-templates\editor-wrapper.php(31): wp_head() #22 C:\xampp\htdocs\vtcrestrict\wp-content\plugins\elementor\core\editor\loader\v1\editor-v1-loader.php(110): include(‘C:\\xampp\\htdocs…’) #23 C:\xampp\htdocs\vtcrestrict\wp-content\plugins\elementor\core\editor\editor.php(163): Elementor\Core\Editor\Loader\V1\Editor_V1_Loader->print_root_template() #24 C:\xampp\htdocs\vtcrestrict\wp-includes\class-wp-hook.php(324): Elementor\Core\Editor\Editor->init(”) #25 C:\xampp\htdocs\vtcrestrict\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters(”, Array) #26 C:\xampp\htdocs\vtcrestrict\wp-includes\plugin.php(517): WP_Hook->do_action(Array) #27 C:\xampp\htdocs\vtcrestrict\wp-admin\admin.php(419): do_action(‘admin_action_el…’) #28 C:\xampp\htdocs\vtcrestrict\wp-admin\post.php(12): require_once(‘C:\\xampp\\htdocs…’) #29 {main} thrown in C:\xampp\htdocs\vtcrestrict\wp-content\themes\woodmart\woocommerce\single-product\product-image.php on line 27
Attachments:
You must be logged in to view attached files.January 24, 2024 at 3:46 pm #533130
Artem TemosKeymasterHello,
Please, disable all plugins that are not related to our theme and provide us with your admin access. We will log in and check what is wrong there. You can leave only the following plugins that are required for our theme:
WoodMart core
WooCommerce
Elementor/WPBakery page builderThank you in advance
January 24, 2024 at 6:36 pm #533207
bathorimatyasParticipantCould you please check just with WPML, that you can translate a prebuilt layout file? It doesn’t work, i tested many times 🙁
I deactivated other plugins and used the default theme, the errors don’t disappear.
I work on local host, i can send you a wp all in one migrate file.January 24, 2024 at 6:48 pm #533214
bathorimatyasParticipantOther topics mentioned this error too.
I made you an account
January 24, 2024 at 7:07 pm #533229
bathorimatyasParticipantSame problem here: https://xtemos.com/forums/topic/translation-of-woodmart-layouts-gets-stuck-after-saving-the-translation/
Please help!
January 24, 2024 at 7:18 pm #533238
bathorimatyasParticipantI think now its ok after a whole day tryout…
This one + single product page preview selected + custom field setup i think now ok. But i test more, please check yourself too.
/* Layout edit topic fix */
add_action( ‘woocommerce_before_template_part’, function () {
global $product;
if ( wp_is_json_request() && ! $product ) {
$random_product = new WP_Query(
array(
‘posts_per_page’ => ‘1’,
‘post_type’ => ‘product’,
)
);while ( $random_product->have_posts() ) {
$random_product->the_post();
$product_id = get_the_ID();
}wp_reset_postdata();
$product = wc_get_product( $product_id) ;
}
} );Attachments:
You must be logged in to view attached files.January 25, 2024 at 10:55 am #533364
bathorimatyasParticipantThank you i found the solution with older forum topics and many tryouts. You can close this ticket now.
-
AuthorPosts
The topic ‘Can’t edit the layout custom post type on foreign language’ is closed to new replies.
- You must be logged in to create new topics. Login / Register