Audio Playlist Shortcode Issue in Elementor Caching
-
WordPress Version: 6.6.2
Elementor Version: 3.24.4I’m encountering an issue when using the Text Editor widget in Elementor to create an audio playlist via the “Add Media” button. Here’s the detailed process:
- In Text Editor, I click Add Media -> Create audio playlist.
- I select multiple audio files, click Create a new playlist, and insert the playlist.
- The generated shortcode looks like this:
[playlist ids="94,92"]. - After publishing, the page works correctly the first time.
However, on subsequent visits, the audio player fails to load, and the following error appears in the console (Dev Tools):
jquery.min.js?ver=3.7.1:2 Uncaught Error: Template not found: #tmpl-wp-playlist-current-item
at n.currentTemplate (wp-util.min.js?ver=6.6.2:2:371)
at n.renderCurrent (wp-playlist.min.js?ver=6.6.2:1:1862)
at n.initialize (wp-playlist.min.js?ver=6.6.2:1:473)
at h.View (backbone.min.js?ver=1.5.0:2:14872)
at new n (backbone.min.js?ver=1.5.0:2:23777)
at HTMLDivElement.<anonymous> (wp-playlist.min.js?ver=6.6.2:1:3328)
at Function.each (jquery.min.js?ver=3.7.1:2:3129)
at e.<computed>.each (jquery.min.js?ver=3.7.1:2:1594)
at HTMLDocument.s (wp-playlist.min.js?ver=6.6.2:1:3312)
at e (jquery.min.js?ver=3.7.1:2:27028)This problem appears to occur because the shortcode is cached by Elementor on subsequent page loads at:
wp-content/plugins/elementor/core/base/document.php:1798Due to this, the actions tied to the shortcode, located in the following files, do not execute on subsequent visits:
wp-includes/media.php:3114wp-includes/media.php:2877
The specific action not being triggered is:
add_action('wp_footer', 'wp_underscore_playlist_templates', 0);Could you please provide a solution to prevent Elementor from caching the shortcode in this way or a workaround to ensure the necessary actions are executed?
The topic ‘Audio Playlist Shortcode Issue in Elementor Caching’ is closed to new replies.