Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 5 replies, has 2 voices.

Last updated by pieter-janP 4 years, 6 months ago.

Assisted by: Bruno.

Author Posts
April 15, 2020 at 9:16 am #5911697

pieter-janP

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?

Kind regards,

Tom

April 16, 2020 at 8:43 pm #5927233

Bruno

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.

Thank you.

April 20, 2020 at 8:21 am #5946405

pieter-janP

Thank you for your time! I already read this answer in another thread, but just like other WPML users this answer is not going to work for us.

We would have to change this for multiple sites and redo it on every update. Please move forward with the release.

April 20, 2020 at 4:39 pm #5951527

Bruno

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.

Thank you.

July 10, 2020 at 11:38 am #6568497

pieter-janP

Do you have any update for us? Just updated the plugin again, in the meanwhile we updated to many newer version...

September 9, 2022 at 8:05 am #12019913

pieter-janP

Can you please move forward with this issue? More than 2 years ago you told us it's a bug and it will be fixed...