Hello,
We are using the following TagDiv short code in the Classic Editor
[gallery td_select_gallery_slide="slide" size="large" link="file" ids="472210,472208,472206,472204,472202,472200,472197,472195,472193,472191,472189,472187"]
The Fatal Error that is appearing is
[18-Mar-2025 17:47:56 UTC] PHP Fatal error: Uncaught ErrorException: td_js_buffer::add_to_footer - the header JS was already rendered when you called td_js_buffer::add_to_footer() (ex: was called to late) in /code/wp-content/plugins/td-composer/legacy/common/wp_booster/td_js_buffer.php:52
Stack trace:
#0 /code/wp-content/plugins/td-composer/legacy/common/wp_booster/td_wp_booster_functions.php(2357): td_js_buffer::add_to_footer('\r\n\t\t\t\r\n ...')
#1 /code/wp-includes/class-wp-hook.php(324): td_gallery_shortcode('', Array, 3)
#2 /code/wp-includes/plugin.php(205): WP_Hook->apply_filters('', Array)
#3 /code/wp-includes/media.php(2703): apply_filters('post_gallery', '', Array, 3)
#4 /code/wp-includes/shortcodes.php(434): gallery_shortcode(Array, '', 'gallery')
#5 /code/wp-includes/media.php(5232): do_shortcode_tag(Array)
#6 /code/wp-includes/media.php(5367): get_post_galleries(Object(WP_Post), false)
#7 /code/wp-includes/media.php(5409): get_post_gallery(Object(WP_Post), false)
#8 /code/wp-content/plugins/wordpress-seo/src/helpers/image-helper.php(182): get_post_gallery_images(Object(WP_Post))
#9 /code/wp-content/plugins/wordpress-seo/src/builders/indexable-post-builder.php(372): Yoast\WP\SEO\Helpers\Image_Helper->get_gallery_image(472224)
#10 /code/wp-content/plugins/wordpress-seo/src/builders/indexable-social-image-trait.php(145): Yoast\WP\SEO\Builders\Indexable_Post_Builder->find_alternative_image(Object(Yoast\WP\SEO\Models\Indexable))
#11 /code/wp-content/plugins/wordpress-seo/src/builders/indexable-post-builder.php(157): Yoast\WP\SEO\Builders\Indexable_Post_Builder->handle_social_images(Object(Yoast\WP\SEO\Models\Indexable))
#12 /code/wp-content/plugins/wordpress-seo/src/builders/indexable-builder.php(329): Yoast\WP\SEO\Builders\Indexable_Post_Builder->build(472224, Object(Yoast\WP\SEO\Models\Indexable))
#13 /code/wp-content/plugins/wordpress-seo/src/builders/indexable-builder.php(195): Yoast\WP\SEO\Builders\Indexable_Builder->build(Object(Yoast\WP\SEO\Models\Indexable), Array)
#14 /code/wp-content/plugins/wordpress-seo/src/repositories/indexable-repository.php(338): Yoast\WP\SEO\Builders\Indexable_Builder->build_for_id_and_type(472224, 'post')
#15 /code/wp-content/plugins/wordpress-seo/src/repositories/indexable-repository.php(117): Yoast\WP\SEO\Repositories\Indexable_Repository->find_by_id_and_type(472224, 'post')
#16 /code/wp-content/plugins/wordpress-seo/inc/class-wpseo-admin-bar-menu.php(184): Yoast\WP\SEO\Repositories\Indexable_Repository->for_current_page()
#17 /code/wp-content/plugins/wordpress-seo/inc/class-wpseo-admin-bar-menu.php(830): WPSEO_Admin_Bar_Menu->get_current_indexable()
#18 /code/wp-content/plugins/wordpress-seo/inc/class-wpseo-admin-bar-menu.php(780): WPSEO_Admin_Bar_Menu->get_score_icon()
#19 /code/wp-content/plugins/wordpress-seo/inc/class-wpseo-admin-bar-menu.php(366): WPSEO_Admin_Bar_Menu->get_post_score(Object(WP_Post))
#20 /code/wp-content/plugins/wordpress-seo/inc/class-wpseo-admin-bar-menu.php(211): WPSEO_Admin_Bar_Menu->add_root_menu(Object(WP_Admin_Bar))
#21 /code/wp-includes/class-wp-hook.php(324): WPSEO_Admin_Bar_Menu->add_menu(Object(WP_Admin_Bar))
#22 /code/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#23 /code/wp-includes/plugin.php(565): WP_Hook->do_action(Array)
#24 /code/wp-includes/admin-bar.php(97): do_action_ref_array('admin_bar_menu', Array)
#25 /code/wp-includes/class-wp-hook.php(324): wp_admin_bar_render('')
#26 /code/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#27 /code/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#28 /code/wp-includes/general-template.php(3080): do_action('wp_footer')
#29 /code/wp-content/plugins/td-composer/legacy/Newspaper/footer.php(324): wp_footer()
#30 /code/wp-content/plugins/td-composer/td-composer.php(262): require_once('/code/wp-conten...')
#31 /code/wp-includes/class-wp-hook.php(324): {closure}('')
#32 /code/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
#33 /code/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#34 /code/wp-content/themes/Newspaper/footer.php(2): do_action('tdc_footer')
#35 /code/wp-includes/template.php(810): require_once('/code/wp-conten...')
#36 /code/wp-includes/template.php(745): load_template('/code/wp-conten...', true, Array)
#37 /code/wp-includes/general-template.php(92): locate_template(Array, true, true, Array)
#38 /code/wp-content/plugins/td-cloud-library/wp_templates/tdb_view_single.php(235): get_footer()
#39 /code/wp-includes/template-loader.php(106): include('/code/wp-conten...')
#40 /code/wp-blog-header.php(19): require_once('/code/wp-includ...')
#41 /code/index.php(17): require('/code/wp-blog-h...')
#42 {main}
thrown in /code/wp-content/plugins/td-composer/legacy/common/wp_booster/td_js_buffer.php on line 52
I have confirmed that when Yoast is disabled the gallery works as intended, but with it enabled, the fatal error persists. If I change the shortcode to standard WordPress gallery it works, so it specific to the td_select_gallery_slide=”slide” gallery.
I am not sure if this is a specific TagDiv issue that can be fixed or if this is a Yoast issue that I need to bring up with them.
Thank you in advance.
Hello,
Please also let me know what version of the theme you use and what PHP you have.
I checked using version 12.6.9 of the theme, the PHP version 8.1.10, and this error does not appear using the latest version of Yoast and tagdiv plugins. Also, do you have the premium version of the Yoast?
Thank you!
@anamaria,
Please see the site info below.
### wp-core ###
version: 6.7.2
site_language: en_US
user_language: en_US
timezone: America/New_York
permalink: /%postname%/
https_status: true
multisite: false
user_registration: 0
blog_public: 0
default_comment_status: open
environment_type: development
user_count: 15
dotorg_communication: true
### wp-paths-sizes ###
wordpress_path: /code
wordpress_size: 94.86 MB (99465258 bytes)
uploads_path: /code/wp-content/uploads
uploads_size: 0.00 B (0 bytes)
themes_path: /code/wp-content/themes
themes_size: 8.03 MB (8415114 bytes)
plugins_path: /code/wp-content/plugins
plugins_size: 28.00 B (28 bytes)
fonts_path: /code/wp-content/uploads/fonts
fonts_size: 2.28 MB (2386544 bytes)
database_size: 29.67 MB (31113216 bytes)
total_size: 134.83 MB (141380160 bytes)
### wp-active-theme ###
name: Newspaper Child theme (Newspaper-child)
version: 9.0c
author: tagDiv
author_website: http://themeforest.net/user/tagDiv/portfolio
parent_theme: Newspaper (Newspaper)
theme_features: core-block-patterns, post-formats, post-thumbnails, automatic-feed-links, html5, woocommerce, bbpress, align-wide, align-full, editor-font-sizes, widgets-block-editor, editor-style, menus, widgets
theme_path: /code/wp-content/themes/Newspaper-child
auto_update: Disabled
### wp-parent-theme ###
name: Newspaper (Newspaper)
version: 12.6.9
author: tagDiv
author_website: https://themeforest.net/user/tagDiv/portfolio
theme_path: /code/wp-content/themes/Newspaper
auto_update: Disabled
### wp-themes-inactive (1) ###
Twenty Twenty-Five: version: 1.1, author: the WordPress team, Auto-updates disabled
### wp-mu-plugins (1) ###
Pantheon MU Plugin Loader: version: 1.0, author: Pantheon Systems
### wp-plugins-active (41) ###
Advanced Custom Fields: version: 6.3.12, author: WP Engine, Auto-updates disabled
Autocomplete WooCommerce Orders: version: 3.4.0, author: QuadLayers, Auto-updates disabled
Bulk Move: version: 1.3.0, author: Sudar, Auto-updates disabled
Classic Editor: version: 1.6.7, author: WordPress Contributors, Auto-updates disabled
Classic Widgets: version: 0.3, author: WordPress Contributors, Auto-updates disabled
Code Snippets: version: 3.6.8, author: Code Snippets Pro, Auto-updates disabled
Convert Pro: version: 1.8.1, author: Brainstorm Force, Auto-updates disabled
Convert Pro – Addon: version: 1.5.14, author: Brainstorm Force, Auto-updates disabled
Disable Bloat for WordPress & WooCommerce: version: 3.5.0, author: Disable Bloat, Auto-updates disabled
Disable Comments: version: 2.4.7, author: WPDeveloper, Auto-updates disabled
Duplicate Page: version: 4.5.4, author: mndpsingh287, Auto-updates disabled
FluentSMTP: version: 2.2.90, author: FluentSMTP & WPManageNinja Team, Auto-updates disabled
Gravity Forms: version: 2.9.4, author: Gravity Forms, Auto-updates disabled
Gravity Forms ActiveCampaign Add-On: version: 2.1.0, author: Gravity Forms, Auto-updates disabled
Gravity Forms Advanced Post Creation Add-On: version: 1.5.0, author: Gravity Forms, Auto-updates disabled
Gravity Forms Authorize.Net Add-On: version: 2.11, author: Gravity Forms, Auto-updates disabled
Gravity Forms Google Analytics Add-On: version: 2.3.0, author: Gravity Forms, Auto-updates disabled
Gravity Forms reCAPTCHA Add-On: version: 1.6.0, author: Gravity Forms, Auto-updates disabled
GTM4WP – A Google Tag Manager (GTM) plugin for WordPress: version: 1.20.3, author: Thomas Geiger, Auto-updates disabled
Legendary Core for WordPress: version: 1.01.134, author: support@legendarydata.com, Auto-updates disabled
Legendary Data – Search Plugin: version: 1.00.022, author: Alvin Kreitman / Legendary Data, Auto-updates disabled
Molongui Authorship: version: 5.0.15, author: Molongui, Auto-updates disabled
Native PHP Sessions for WordPress: version: 1.4.3, author: Pantheon, Auto-updates disabled
Redirection: version: 5.5.2, author: John Godley, Auto-updates disabled
Simple User Avatar: version: 4.7, author: Matteo Manna, Auto-updates disabled
tagDiv Cloud Library: version: 3.8 | built on 10.02.2025 10:50, author: tagDiv, Auto-updates disabled
tagDiv Composer: version: 5.3 | built on 10.02.2025 10:50, author: tagDiv, Auto-updates disabled
Temporary Login Without Password: version: 1.9.0, author: StoreApps, Auto-updates disabled
The Events Calendar: version: 6.10.2, author: The Events Calendar, Auto-updates disabled
TotalPoll – Pro: version: 4.11.0, author: TotalSuite, Auto-updates disabled
User Role Editor: version: 4.64.4, author: Vladimir Garagulya, Auto-updates disabled
WooCommerce: version: 9.7.1, author: Automattic, Auto-updates disabled
WooCommerce.com Update Manager: version: 1.0.3, author: Automattic, Auto-updates disabled
WooCommerce Authorize.Net Gateway: version: 3.10.10, author: SkyVerge, Auto-updates disabled
WooCommerce Memberships: version: 1.26.11, author: SkyVerge, Auto-updates disabled
WooCommerce Subscriptions: version: 7.2.1, author: WooCommerce, Auto-updates disabled
WP-DraftsForFriends: version: 1.0.2, author: Lester ‘GaMerZ’ Chan, Auto-updates disabled
WP All Import – ACF Add-On: version: 3.3.9, author: Soflyy, Auto-updates disabled
WP All Import – User Import Add-On Pro: version: 1.1.8, author: Soflyy, Auto-updates disabled
WP All Import Pro: version: 4.10.1, author: Soflyy, Auto-updates disabled
WP Crontrol: version: 1.18.0, author: John Blackbourn, Auto-updates disabled
### wp-plugins-inactive (7) ###
EWWW Image Optimizer: version: 8.1.2, author: Exactly WWW, Auto-updates disabled
Featured Image Admin Thumb: version: 1.6, author: Sean Hayes, Auto-updates disabled
Pantheon Advanced Page Cache: version: 2.1.1, author: Pantheon, Auto-updates disabled
WP Fusion Lite: version: 3.44.8, author: Very Good Plugins, Auto-updates disabled
Yoast SEO: version: 24.7, author: Team Yoast, Auto-updates disabled
Yoast SEO: News: version: 13.3, author: Team Yoast, Auto-updates disabled
Yoast SEO Premium: version: 24.5, author: Team Yoast, Auto-updates disabled
### code-snippets (12) ###
snippet-5: name: Customize WP Login Screen, scope: global, modified: 2025-02-11 16:10:24
snippet-6: name: Issue Archive and Current Issue Shortcode, scope: global, modified: 2025-02-11 16:20:31, tags: [Shortcode]
snippet-7: name: Remove unnecessary fields from user edit screen, scope: global, modified: 2025-02-11 16:26:01
snippet-9: name: WordPress Admin Styles, scope: global, modified: 2025-02-04 16:55:35
snippet-12: name: Disable Yoast Redirects, scope: global, modified: 2025-02-21 18:52:27
snippet-13: name: Remove WooCommerce Payments Menu Item from Admin, scope: global, modified: 2025-02-05 18:01:46
snippet-14: name: WooMemberships Paywall Message, scope: global, modified: 2025-02-20 21:10:16
snippet-15: name: Disable Contributor upsell widget, scope: global, modified: 2025-03-11 14:14:04, tags: [Molongui Authorship]
snippet-16: name: IMPORT SCRIPT – For Guest Authors and Image Attachments, scope: global, modified: 2025-03-18 18:35:41, tags: [WP All Import]
snippet-17: name: Latest Poll Shortcode, scope: global, modified: 2025-03-11 14:14:52, tags: [TotalPoll Pro]
snippet-18: name: Rotate ConvertPro CTAs Shortcode, scope: global, modified: 2025-03-11 14:41:26, tags: [ConvertPro, Shortcode]
snippet-20: name: Add Hide Featured Image Checkbox and functionality., scope: global, modified: 2025-03-18 19:46:30
### wp-media ###
image_editor: WP_Image_Editor_Imagick
imagick_module_version: 1693
imagemagick_version: ImageMagick 6.9.13-17 Q16 x86_64 18482 https://legacy.imagemagick.org
imagick_version: 3.7.0
file_uploads: 1
post_max_size: 100M
upload_max_filesize: 100M
max_effective_size: 100 MB
max_file_uploads: 50
imagick_limits:
imagick::RESOURCETYPE_AREA: 251 GB
imagick::RESOURCETYPE_DISK: 9.2233720368548E+18
imagick::RESOURCETYPE_FILE: 24576
imagick::RESOURCETYPE_MAP: 126 GB
imagick::RESOURCETYPE_MEMORY: 63 GB
imagick::RESOURCETYPE_THREAD: 1
imagick::RESOURCETYPE_TIME: 0
imagemagick_file_formats: 3FR, 3G2, 3GP, AAI, AI, APNG, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CR3, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FLV, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JBG, JBIG, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, POCKETMOD, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIDEO, VIFF, VIPS, VST, WBMP, WEBM, WEBP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
gd_version: bundled (2.1.0 compatible)
gd_formats: GIF, JPEG, PNG, WebP, BMP, AVIF, XPM
ghostscript_version: 9.27
### the-events-calendar ###
### wp-server ###
server_architecture: Linux 6.1.112+ x86_64
httpd_software: nginx/1.27.1
php_version: 8.3.19 64bit
php_sapi: fpm-fcgi
max_input_variables: 10000
time_limit: 120
memory_limit: 1024M
max_input_time: 900
upload_max_filesize: 100M
php_post_max_size: 100M
curl_version: 7.61.1 OpenSSL/1.1.1k
suhosin: false
imagick_availability: true
pretty_permalinks: true
htaccess_extra_rules: true
current: 2025-03-20T14:32:51+00:00
utc-time: Thursday, 20-Mar-25 14:32:51 UTC
server-time: 2025-03-20T10:32:50-04:00
### wp-database ###
extension: mysqli
server_version: 10.4.25-MariaDB-log
client_version: mysqlnd 8.3.19
max_allowed_packet: 67108864
max_connections: 1024
### wp-constants ###
WP_HOME: https://dev-hartfordbusiness-com-wp.pantheonsite.io
WP_SITEURL: https://dev-hartfordbusiness-com-wp.pantheonsite.io
WP_CONTENT_DIR: /code/wp-content
WP_PLUGIN_DIR: /code/wp-content/plugins
WP_MEMORY_LIMIT: 512M
WP_MAX_MEMORY_LIMIT: 1G
WP_DEBUG: true
WP_DEBUG_DISPLAY: false
WP_DEBUG_LOG: true
SCRIPT_DEBUG: false
WP_CACHE: false
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_ENVIRONMENT_TYPE: undefined
WP_DEVELOPMENT_MODE: undefined
DB_CHARSET: utf8mb4
DB_COLLATE: undefined
### wp-filesystem ###
wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable
fonts: writable
mu-plugins: writable
### acf ###
version: 6.3.12
plugin_type: Free
update_source: wordpress.org
ui_field_groups: 3
php_field_groups: 0
json_field_groups: 0
rest_field_groups: 0
post_types_enabled: true
ui_post_types: 27
json_post_types: 0
ui_taxonomies: 17
json_taxonomies: 0
rest_api_format: light
admin_ui_enabled: true
field_type-modal_enabled: true
field_settings_tabs_enabled: false
shortcode_enabled: false
registered_acf_forms: 0
json_save_paths: 1
json_load_paths: 1
-
This reply was modified 1 year by
nearview.
Hi Anamaria,
It looks like it may have just been a case of gremlins! I deactivated all plugins except for TD Composer and Cloud Library, and the 500 error disappeared. I then re-enabled each plugin one by one, testing along the way, and still no error—everything is working fine now.
Not entirely sure what that means, but since the issue isn’t occurring anymore, there’s not much I can debug at the moment. 😊 I’ll reach out again if the problem resurfaces.
