We are trying to get rid of this render blocking file loading on the front-end: hidden link
This is a render blocking file and it's causing Google to downgrade speed scores, some customers asked us why the pagespeed score is significantly lower.
Another thread on this forum complains about the same, but no actions where made and the ticket is closed.
This happens on every WPML site we own, I can't understand why this is still not updated. It's a redundant file for the front-end, how hard is it too dequeue it?
Thank you for contacting us. This looks like a bug and our team is aware of this problem. This will be fixed in a future version of WPML, but at the moment we don't have a deadline.
As a workaround, please follow the steps below:
- Open the wp-content/plugins/wpml-translation-management/classes/admin-bar/Hooks.php
- On the "add_hooks" method, add the if conditional:
public function add_hooks() {
add_action( 'admin_bar_menu', [ $this, 'addTranslateMenuItem' ], 80 );
add_action( 'wp_enqueue_scripts', [ $this, 'enqueueScripts' ] );
}
to
public function add_hooks() {
add_action( 'admin_bar_menu', [ $this, 'addTranslateMenuItem' ], 80 );
if ( is_user_logged_in() ) {
add_action( 'wp_enqueue_scripts', [ $this, 'enqueueScripts' ] );
}
}
Note that at the moment this is the only workaround that we have. A version with that fixed will be released in a future version by our developers.
As I explained above, it will depend on our developers. Since they are already aware of the problem, they will decide when the fixed version will work.
At the moment we have no other option but to wait for our developers to release the version with that already fixed. We don't have a deadline for when this will be released.