Combine JavaScript Files conflicts with PDF Embedder
-
Hi there,
When the “Combine JavaScript Files” option is activated on the SG optimizer, the PDF embedder plugin is not functioning and throwing the error below.
I have added the following code to functions.php to exclude it, but still getting the error.
Right now, the “Combine JavaScript Files” is not active, and the PDF is working on the following URL.https://craft-bilt.com/catalogue/
PS. Even when I use the “excluding URL” option, still gives the same error.
Did I miss anything during the implementation?
Please let me know. ThanksError:
“Setting up fake worker failed: “Cannot load script at: https://craft-bilt.com/wp-content/uploads/siteground-optimizer-assets/siteground-optimizer-combined-js-cb937f7701612535bf71c597ee663506.worker.js”.”**********************************************************************************************************
add_filter( ‘sgo_javascript_combine_exclude’, ‘js_combine_exclude’ );
function js_combine_exclude( $exclude_list ) {
$exclude_list[] = ‘pdfemb_embed_pdf_js and pdfemb_pdf_js’;return $exclude_list;
}add_filter( ‘sgo_js_minify_exclude’, ‘js_minify_exclude’ );
function js_minify_exclude( $exclude_list ) {
$exclude_list[] = ‘pdfemb_embed_pdf_js and pdfemb_pdf_js’;return $exclude_list;
}add_filter( ‘sgo_css_combine_exclude’, ‘css_combine_exclude’ );
function css_combine_exclude( $exclude_list ) {
// Add the style handle to exclude list.
$exclude_list[] = ‘pdfemb_embed_pdf_css’;return $exclude_list;
}add_filter( ‘sgo_css_minify_exclude’, ‘css_minify_exclude’ );
function css_minify_exclude( $exclude_list ) {
// Add the style handle to exclude list.
$exclude_list[] = ‘pdfemb_embed_pdf_css’;return $exclude_list;
}
The topic ‘Combine JavaScript Files conflicts with PDF Embedder’ is closed to new replies.