Home › Forums › WoodMart support forum › Critical Error: Uncaught Error: Call to a member function get_gallery_image_ids
Critical Error: Uncaught Error: Call to a member function get_gallery_image_ids
- This topic has 5 replies, 2 voices, and was last updated 2 hours, 8 minutes ago by Artem Temos.
-
AuthorPosts
-
November 25, 2024 at 7:03 am #615332
rokannParticipantHello Woodmart Support Team,
I am experiencing a critical error on my website while using the Woodmart theme with WooCommerce. The error appears on the single product page and is related to the product-image.php file. Here is the exact error message:
Uncaught Error: Call to a member function get_gallery_image_ids() on null in /home/adildede/htdocs/adildede.com/wp-content/themes/woodmart/woocommerce/single-product/product-image.php:27
{
“error”: {
“type”: 1,
“file”: “/home/adildede/htdocs/adildede.com/wp-content/themes/woodmart/woocommerce/single-product/product-image.php”,
“line”: 27
},
“remote-logging”: true,
“backtrace”: [
“”,
“#0 /home/adildede/htdocs/adildede.com/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include()”,
“#1 /home/adildede/htdocs/adildede.com/wp-content/themes/woodmart/inc/integrations/gutenberg/src/layouts/sp-gallery/render.php(16): wc_get_template()”,
“#2 /home/adildede/htdocs/adildede.com/wp-includes/class-wp-block.php(537): wd_gutenberg_single_product_gallery()”,
“#3 /home/adildede/htdocs/adildede.com/wp-includes/class-wp-block.php(517): WP_Block->render()”,
“#4 /home/adildede/htdocs/adildede.com/wp-includes/class-wp-block.php(517): WP_Block->render()”,
“#5 /home/adildede/htdocs/adildede.com/wp-includes/class-wp-block.php(517): WP_Block->render()”,
“#6 /home/adildede/htdocs/adildede.com/wp-includes/blocks.php(2190): WP_Block->render()”,
“#7 /home/adildede/htdocs/adildede.com/wp-includes/blocks.php(2242): render_block()”,
“#8 /home/adildede/htdocs/adildede.com/wp-includes/class-wp-hook.php(324): do_blocks()”,
“#9 /home/adildede/htdocs/adildede.com/wp-includes/plugin.php(205): WP_Hook->apply_filters()”,
“#10 /home/adildede/htdocs/adildede.com/wp-content/plugins/seo-by-rank-math/includes/modules/links/class-links.php(171): apply_filters()”,
“#11 /home/adildede/htdocs/adildede.com/wp-content/plugins/seo-by-rank-math/includes/modules/links/class-links.php(59): RankMath\Links\Links->process()”,
“#12 /home/adildede/htdocs/adildede.com/wp-includes/class-wp-hook.php(326): RankMath\Links\Links->save_post()”,
“#13 /home/adildede/htdocs/adildede.com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()”,
“#14 /home/adildede/htdocs/adildede.com/wp-includes/plugin.php(517): WP_Hook->do_action()”,
“#15 /home/adildede/htdocs/adildede.com/wp-includes/post.php(5060): do_action()”,
“#16 /home/adildede/htdocs/adildede.com/wp-includes/post.php(5162): wp_insert_post()”,
“#17 /home/adildede/htdocs/adildede.com/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(946): wp_update_post()”,
“#18 /home/adildede/htdocs/adildede.com/wp-includes/rest-api/class-wp-rest-server.php(1292): WP_REST_Posts_Controller->update_item()”,
“#19 /home/adildede/htdocs/adildede.com/wp-includes/rest-api/class-wp-rest-server.php(1125): WP_REST_Server->respond_to_request()”,
“#20 /home/adildede/htdocs/adildede.com/wp-includes/rest-api/class-wp-rest-server.php(439): WP_REST_Server->dispatch()”,
“#21 /home/adildede/htdocs/adildede.com/wp-includes/rest-api.php(449): WP_REST_Server->serve_request()”,
“#22 /home/adildede/htdocs/adildede.com/wp-includes/class-wp-hook.php(324): rest_api_loaded()”,
“#23 /home/adildede/htdocs/adildede.com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()”,
“#24 /home/adildede/htdocs/adildede.com/wp-includes/plugin.php(565): WP_Hook->do_action()”,
“#25 /home/adildede/htdocs/adildede.com/wp-includes/class-wp.php(418): do_action_ref_array()”,
“#26 /home/adildede/htdocs/adildede.com/wp-includes/class-wp.php(813): WP->parse_request()”,
“#27 /home/adildede/htdocs/adildede.com/wp-includes/functions.php(1336): WP->main()”,
“#28 /home/adildede/htdocs/adildede.com/wp-blog-header.php(16): wp()”,
“#29 /home/adildede/htdocs/adildede.com/index.php(17): require(‘…’)”,
“#30 {main}”,
“thrown”
]
}Can you help me with that?
November 25, 2024 at 10:51 am #615394
Artem TemosKeymasterHello,
We just checked your product page and it seems to be working correctly. Could you please clarify how to reproduce this PHP error? https://gyazo.com/84c325b0159277a36bfc8ee166e156b4
Kind Regards
November 25, 2024 at 11:03 am #615407
rokannParticipantI’m using Gutenberg as my page editor. On my product page, I’m setting the background of the product description section to white, but after saving, it appears transparent. Additionally, when I click the save button, it doesn’t perform any action. In the admin panel, under WooCommerce → Status → Logs, a fatal-errors log file is being generated. You could check it yourself if it’s not too much trouble.
Attachments:
You must be logged in to view attached files.November 25, 2024 at 11:56 am #615455
Artem TemosKeymasterTry to add the following PHP code snippet to the child theme functions.php file to fix this
add_filter( 'rank_math/excluded_post_types', function ( $post_type ) { if ( isset( $post_type['woodmart_layout'] ) ) { unset( $post_type['woodmart_layout'] ); } return $post_type; } );
November 25, 2024 at 12:06 pm #615458
rokannParticipantThis is truly excellent support! The code you provided worked perfectly. I’m sure there are others using the Rank Math SEO plugin who might encounter the same issue. Hopefully, a patch addressing this problem will be released in the future.
Thank you for your assistance!
November 25, 2024 at 1:22 pm #615519
Artem TemosKeymasterWe are always happy to help. Sure, this patch will be included in our next theme update.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register