Forum Replies Created
-
-
2 years ago in reply to: SiteGround Optimizer issues
So I heard back once again from Technical Support:
Hello Paul,
As my colleagues previously suggested, the error on the web page is related to the “Combine JavaScript Files” feature of SiteGround Optimizer, and the suggested fix from the third-party plugin is related to the “Defer Render-blocking JavaScript” functionality.
In any case, our plugin offers the option to exclude certain scripts or files from the Frontend optimization features. You can find more information about these options in our plugin documentation here:
https://wordpress.org/plugins/sg-cachepress/
Upon reviewing the case, I was able to resolve the issue by excluding one of the scripts on the site from the “Combine JavaScript Files” feature of our plugin. I added the following to the functions.php file of the WordPress theme:
add_filter( 'sgo_javascript_combine_exclude', 'js_combine_exclude' ); function js_combine_exclude( $exclude_list ) { $exclude_list[] = 'flowplayer'; return $exclude_list; }
This way the “Check template” checker no longer generates errors with “Combine JavaScript Files” enabled:
This way the site is using both “Combine JavaScript Files” and “Defer Render-blocking JavaScript” and there are no errors that are generated. Please review your website in order to make sure that it is working as expected.
Should you need further assistance you can reach us back anytime!
Best Regards,
Technical Support TeamEverything appears to be working and no errors are occurring. ;)
Sincerely,
Paul2 years ago in reply to: SiteGround Optimizer issuesI did receive a response from SG Support… this was what they stated:
Hello Paul,
I have reviewed the reported case and the actual error that the FV Player was generating due to the “Defer Render-blocking JavaScript” function is the one below.
It appears there are no jQuery library on your site, your videos might not be playing, please check.
In order to resolve this, I have used the “Exclude from Deferral of Render-blocking JS” function of our Optimizer plugin to exclude the .js which is responsible for the jQuery library and is used by FV Player, and the error is no longer present.
However, the other error below that this plugin is generating does not appear to be related to our function
It appears there are no Flowplayer scripts on your site, your videos might not be playing, please check. Check your template’s header.php file if it contains wp_head() function call and footer.php should contain wp_footer()!
This error is caused by the “Combine JavaScript Files” function, I have attempted to exclude the FV Player scripts from it, however, they appear to be loaded inline, due to which this needs to be done with the filter below by adding it to the functions.php file of your website.
add_filter( 'sgo_javascript_combine_excluded_inline_content', 'js_combine_exclude_inline_script' ); function js_combine_exclude_inline_script( $exclude_list ) { $exclude_list[] = 'first few symbols of inline content script'; return $exclude_list; }
I was not able to find the exact handle that the scripts use, due to which my attempts for this were unsuccessful, hence it would be best for you to reach out to FV Player’s support and ask them for the exact script handles they are using, after which they can be excluded with the filter above.
However, if the scripts are queued normally, then the filter that needs to be used is:
add_filter( 'sgo_javascript_combine_exclude', 'js_combine_exclude' ); function js_combine_exclude( $exclude_list ) { $exclude_list[] = 'script-handle'; $exclude_list[] = 'script-handle-2'; return $exclude_list; }
For the time being, I have disabled the “Combine JavaScript Files” function and this error is no longer present as well:
In regards to the notice that you have received, this was due to my attempts to exclude the scripts in question via the above-provided filters.
Should you require any further assistance from our end, please let us know.
Best regards,
Technical Support TeamThey did put the changes back… I received a message about the website stability… but, then I discovered they were doing diagnostics. That response is above!
Sincerely,
Paul2 years ago in reply to: SiteGround Optimizer issues2 years ago in reply to: When video stats enabled 403 error occursI found out the issue… SG Security :
Lock and Protect System Folders
RECOMMENDED
By enabling this option you are ensuring that no unauthorized or malicious scripts can be executed in your system folders. This is an often exploited back door you can close with a simple toggle. I do not see an exception to this…Sincerely,
Paul2 years ago in reply to: SiteGround Optimizer issuesI just verified that I am not applying an exception to deferring. When I turn off deferring the page works… when I turn it back on it does not. The only other item I am seeing is Exclude Media Types from Lazy Load with Shortcodes as marked.
Sincerey,
Paul