Fatal Error using Shortcode with Kadence Woo Template
-
Hi there
I’m using CatalogX on a client site with Kadence custom woo templates.
I have 2 issues:
1. The Enquiry button does not appear on any of the custom templates by default. It does however work on the default woocommerce templates. I need to use the short code provided to have it appear on the custom templates.
2. When using the shortcode, it shows correctly on the frontend (And works well), however when I try to edit the template again I get an fatal error, not allowing me to enter the edit template window.
This is the error log:WordPress version 6.8.3
Active theme: Kadence (version 1.2.28)
Current plugin: CatalogX — Catalog Mode, Enquiry & Quotes for WooCommerce (version 6.0.7)
PHP version 8.1.27
Error Details
=============
An error of type E_ERROR was caused in line 202 of the file /home/XXXXX/public_html/XXXXX/wp-content/plugins/woocommerce-catalog-enquiry/modules/Enquiry/Frontend.php. Error message: Uncaught Error: Call to a member function get_id() on null in /home/XXXXX/public_html/XXXXX/wp-content/plugins/woocommerce-catalog-enquiry/modules/Enquiry/Frontend.php:202
Stack trace:
#0 /home/XXXXX/public_html/XXXXX/wp-includes/shortcodes.php(434): CatalogX\Enquiry\Frontend->catalogx_enquiry_button_shortcode()
#1 [internal function]: do_shortcode_tag()
#2 /home/XXXXX/public_html/XXXXX/wp-includes/shortcodes.php(273): preg_replace_callback()
#3 /home/XXXXX/public_html/XXXXX/wp-includes/class-wp-hook.php(324): do_shortcode()
#4 /home/XXXXX/public_html/XXXXX/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#5 /home/XXXXX/public_html/XXXXX/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(1967): apply_filters()
#6 /home/XXXXX/public_html/XXXXX/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(661): WP_REST_Posts_Controller->prepare_item_for_response()
#7 /home/XXXXX/public_html/XXXXX/wp-includes/rest-api/class-wp-rest-server.php(1292): WP_REST_Posts_Controller->get_item()
#8 /home/XXXXX/public_html/XXXXX/wp-includes/rest-api/class-wp-rest-server.php(1125): WP_REST_Server->respond_to_request()
#9 /home/XXXXX/public_html/XXXXX/wp-includes/rest-api.php(586): WP_REST_Server->dispatch()
#10 /home/XXXXX/public_html/XXXXX/wp-includes/rest-api.php(2973): rest_do_request()
#11 [internal function]: rest_preload_api_request()
#12 /home/XXXXX/public_html/XXXXX/wp-includes/block-editor.php(757): array_reduce()
#13 /home/XXXXX/public_html/XXXXX/wp-admin/edit-form-blocks.php(114): block_editor_rest_api_preload()
#14 /home/XXXXX/public_html/XXXXX/wp-admin/post.php(187): require('/home/XXXXX/...')
#15 {main}
thrown
The topic ‘Fatal Error using Shortcode with Kadence Woo Template’ is closed to new replies.