Shortcodes on product short description evaluated twice
-
On my page I’m using a shortcode to a third-party-plugin to display a calendar. This shortcode is evaluated twice, which leads to an error message in this plugin. I have hidden this message using CSS on the linked page, but you can see in the page source:
<div class="shortcode_error"><p>Shortcode of the Booking Package cannot insert multiple shortcodes on one page.<br>ID: 5 has canceled the display.</p></div>To track down the problem I have inserted code to get the call stack when the plugins shortcode is evaluated and got the following two stacks:
1. at the place where the calendar should be rendered:
string(2179) "#0 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-includes/shortcodes.php(343): BOOKING_PACKAGE->bookingPageForVisitors() #1 [internal function]: do_shortcode_tag() #2 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-includes/shortcodes.php(218): preg_replace_callback() #3 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-includes/class-wp-hook.php(287): do_shortcode() #4 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-includes/plugin.php(206): WP_Hook->apply_filters() #5 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-content/plugins/woocommerce/templates/single-product/short-description.php(24): apply_filters() #6 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-content/plugins/woocommerce/includes/wc-core-functions.php(344): include('/mnt/web102/d2/...') #7 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-content/plugins/woocommerce/includes/wc-template-functions.php(1576): wc_get_template() #8 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-includes/class-wp-hook.php(287): woocommerce_template_single_excerpt() #9 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters() #10 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-includes/plugin.php(478): WP_Hook->do_action() #11 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-content/plugins/woocommerce/templates/content-single-product.php(60): do_action() #12 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-includes/template.php(732): require('/mnt/web102/d2/...') #13 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-content/plugins/woocommerce/includes/wc-core-functions.php(283): load_template() #14 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-content/plugins/woocommerce/templates/single-product.php(37): wc_get_template_part() #15 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-includes/template-loader.php(106): include('/mnt/web102/d2/...') #16 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-blog-header.php(19): require_once('/mnt/web102/d2/...') #17 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/index.php(17): require('/mnt/web102/d2/...') #18 {main}"2. later below the categories display (here the error message is generated):
string(1662) "#0 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-includes/shortcodes.php(343): BOOKING_PACKAGE->bookingPageForVisitors() #1 [internal function]: do_shortcode_tag() #2 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-includes/shortcodes.php(218): preg_replace_callback() #3 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-content/plugins/woocommerce/includes/class-wc-structured-data.php(203): do_shortcode() #4 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-includes/class-wp-hook.php(287): WC_Structured_Data->generate_product_data() #5 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters() #6 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-includes/plugin.php(478): WP_Hook->do_action() #7 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-content/plugins/woocommerce/templates/content-single-product.php(60): do_action() #8 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-includes/template.php(732): require('/mnt/web102/d2/...') #9 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-content/plugins/woocommerce/includes/wc-core-functions.php(283): load_template() #10 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-content/plugins/woocommerce/templates/single-product.php(37): wc_get_template_part() #11 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-includes/template-loader.php(106): include('/mnt/web102/d2/...') #12 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/wp-blog-header.php(19): require_once('/mnt/web102/d2/...') #13 /mnt/web102/d2/20/52882920/htdocs/nochmal-erklaert/index.php(17): require('/mnt/web102/d2/...') #14 {main}" Shortcode of the Booking Package cannot insert multiple shortcodes on one page.Why is the shortcode evaluated twice? Do you have any hint to inhibit the second evaluation?
Here my status report:
### WordPress Environment ### WordPress address (URL): https://www.nochmal-erklaert.de Site address (URL): https://www.nochmal-erklaert.de WC Version: 4.5.2 REST API Version: ✔ 4.5.2 WC Blocks Version: ✔ 3.1.0 Action Scheduler Version: ✔ 3.1.6 WC Admin Version: ✔ 1.5.0 Log Directory Writable: ✔ WP Version: 5.5.1 WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: – WP Cron: ✔ Language: de_DE External object cache: – ### Server Environment ### Server Info: Apache/2.4.43 (Unix) PHP Version: 7.4.10 PHP Post Max Size: 76 MB PHP Time Limit: 240 PHP Max Input Vars: 4000 cURL Version: 7.54.0 OpenSSL/1.0.2k SUHOSIN Installed: – MySQL Version: 5.6.42-log Max Upload Size: 64 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔ ### Database ### WC Database Version: 4.5.2 WC Database Prefix: ne_ Datenbank-Gesamtgröße: 9.89MB Datenbank-Datengröße: 7.38MB Datenbank-Indexgröße: 2.51MB ne_woocommerce_sessions: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB ne_woocommerce_api_keys: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB ne_woocommerce_attribute_taxonomies: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB ne_woocommerce_downloadable_product_permissions: Daten: 0.02MB + Index: 0.06MB + Engine InnoDB ne_woocommerce_order_items: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB ne_woocommerce_order_itemmeta: Daten: 0.06MB + Index: 0.03MB + Engine InnoDB ne_woocommerce_tax_rates: Daten: 0.02MB + Index: 0.06MB + Engine InnoDB ne_woocommerce_tax_rate_locations: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB ne_woocommerce_shipping_zones: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_woocommerce_shipping_zone_locations: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB ne_woocommerce_shipping_zone_methods: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_woocommerce_payment_tokens: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB ne_woocommerce_payment_tokenmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB ne_woocommerce_log: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB ne_actionscheduler_actions: Daten: 0.02MB + Index: 0.11MB + Engine InnoDB ne_actionscheduler_claims: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB ne_actionscheduler_groups: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB ne_actionscheduler_logs: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB ne_booking_package_calendarAccount: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_booking_package_coupons: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_booking_package_courseData: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_booking_package_emailSetting: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_booking_package_form: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_booking_package_guests: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_booking_package_optionsForHotel: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_booking_package_regular_holidays: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_booking_package_schedule: Daten: 0.08MB + Index: 0.00MB + Engine InnoDB ne_booking_package_subscriptions: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_booking_package_taxes: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_booking_package_templateSchedule: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_booking_package_userPraivateData: Daten: 0.05MB + Index: 0.00MB + Engine InnoDB ne_booking_package_users: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_booking_package_webhook: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_commentmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB ne_comments: Daten: 0.02MB + Index: 0.09MB + Engine InnoDB ne_links: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB ne_options: Daten: 2.27MB + Index: 0.09MB + Engine InnoDB ne_pimwick_gift_card: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB ne_pimwick_gift_card_activity: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB ne_postmeta: Daten: 1.52MB + Index: 0.56MB + Engine InnoDB ne_posts: Daten: 1.36MB + Index: 0.06MB + Engine InnoDB ne_revslider_css: Daten: 0.13MB + Index: 0.00MB + Engine InnoDB ne_revslider_css_bkp: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_revslider_layer_animations: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_revslider_layer_animations_bkp: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_revslider_navigations: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_revslider_navigations_bkp: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_revslider_sliders: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_revslider_sliders_bkp: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_revslider_slides: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_revslider_slides_bkp: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_revslider_static_slides: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_revslider_static_slides_bkp: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_termmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB ne_terms: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB ne_term_relationships: Daten: 0.05MB + Index: 0.02MB + Engine InnoDB ne_term_taxonomy: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB ne_tm_taskmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB ne_tm_tasks: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB ne_usermeta: Daten: 0.05MB + Index: 0.03MB + Engine InnoDB ne_users: Daten: 0.02MB + Index: 0.05MB + Engine InnoDB ne_wcpdf_invoice_number: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_wc_admin_notes: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_wc_admin_note_actions: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB ne_wc_category_lookup: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_wc_customer_lookup: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB ne_wc_download_log: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB ne_wc_order_coupon_lookup: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB ne_wc_order_product_lookup: Daten: 0.02MB + Index: 0.06MB + Engine InnoDB ne_wc_order_stats: Daten: 0.02MB + Index: 0.05MB + Engine InnoDB ne_wc_order_tax_lookup: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB ne_wc_product_meta_lookup: Daten: 0.02MB + Index: 0.09MB + Engine InnoDB ne_wc_reserved_stock: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_wc_tax_rate_classes: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB ne_wc_webhooks: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB ne_woocommerce_gzd_dhl_labelmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB ne_woocommerce_gzd_dhl_labels: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB ne_woocommerce_gzd_shipmentmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB ne_woocommerce_gzd_shipments: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB ne_woocommerce_gzd_shipment_itemmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB ne_woocommerce_gzd_shipment_items: Daten: 0.02MB + Index: 0.06MB + Engine InnoDB ne_woocommerce_gzd_shipping_provider: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_woocommerce_gzd_shipping_providermeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB ne_yith_wapo_groups: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_yith_wapo_types: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_yith_wccl_meta: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB ne_yoast_indexable: Daten: 0.19MB + Index: 0.08MB + Engine InnoDB ne_yoast_indexable_hierarchy: Daten: 0.02MB + Index: 0.05MB + Engine InnoDB ne_yoast_migrations: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB ne_yoast_primary_term: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB ne_yoast_seo_links: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB ### Post Type Counts ### attachment: 117 nav_menu_item: 33 oembed_cache: 5 page: 19 post: 2 product: 79 revision: 151 shop_coupon: 3 shop_order: 8 us_content_template: 1 us_grid_layout: 2 us_header: 1 us_page_block: 2 wpcf7_contact_form: 2 ### Security ### Secure connection (HTTPS): ✔ Hide errors from visitors: ✔ ### Active Plugins (15) ### Booking Package SAASPROJECT: von SAASPROJECT Booking Package – 1.4.42 Contact Form 7 Conditional Fields: von Jules Colle – 1.9.13 Contact Form 7: von Takayuki Miyoshi – 5.2.2 Flexible Checkout Fields: von WP Desk – 2.5.6 WPBakery Page Builder: von Michael M - WPBakery.com – 6.4.0 Klarna Order Management for WooCommerce: von klarna krokedil – 1.6.0 Klarna Payments for WooCommerce: von krokedil klarna automattic – 2.1.2 – Die installierte Version wurde nicht mit der aktiven WooCommerce-Version 4.5.2 getestet UpSolution Core: von UpSolution – 7.9 User Role Editor: von Vladimir Garagulya – 4.56.1 Germanized für WooCommerce: von vendidero – 3.2.1 WooCommerce PDF Invoices & Packing Slips: von Ewout Fernhout – 2.6.1 WooCommerce: von Automattic – 4.5.2 Yoast SEO: von Team Yoast – 14.9 – Die installierte Version wurde nicht mit der aktiven WooCommerce-Version 4.5.2 getestet WP-Optimize - Clean, Compress, Cache: von David Anderson Ruhani Rabin Team Updraft – 3.1.4 YITH WooCommerce Product Add-ons: von YITH – 1.5.23.3 – Die installierte Version wurde nicht mit der aktiven WooCommerce-Version 4.5.2 getestet ### Inactive Plugins (0) ### ### Settings ### API Enabled: – Force SSL: – Currency: EUR (€) Currency Position: right_space Thousand Separator: . Decimal Separator: , Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) pw gift card (pw-gift-card) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: – ### WC Pages ### Shop-Basis: #6 - /shop/ Warenkorb: #7 - /warenkorb/ Kasse: #8 - /kasse/ Mein Konto: #9 - /mein-konto/ Allgemeine Geschäftsbedingungen: #11 - /agb/ ### Theme ### Name: Impreza for nochmal-erklaert Version: 1.0 Author URL: http://us-themes.com/ Child Theme: ✔ Parent Theme Name: Impreza Parent Theme Version: 7.9 Parent Theme Author URL: http://us-themes.com/ WooCommerce Support: ✔ ### Templates ### Overrides: – ### Action Scheduler ### Abgeschlossen: 19 Oldest: 2020-09-13 16:07:12 +0200 Newest: 2020-09-25 15:26:11 +0200The page I need help with: [log in to see the link]
The topic ‘Shortcodes on product short description evaluated twice’ is closed to new replies.