WPML

Overview of the Issue

Non-admin users, such as editors or custom roles, experience a 403 Forbidden error in the browser console when accessing certain WPML functionality related to the Advanced Translation Editor (ATE) jobs synchronization. This error is evident when inspecting the console tab in browser developer tools.

Keep in mind that this issue won’t affect your site or its translations, you can continue using WPML and translating your website.

Workaround

This issue is fixed. Updating to the latest version solves it on your site, so you only need this workaround if you can’t update yet.

Please, make sure of having a full backup of your site before proceeding.

  • Open …/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/Loader.php file.
  • Replace:
    Hooks::onAction( 'wp_loaded' )
         ->then( [ self::class, 'getData' ] )
         ->then( $maybeLoadStatusBarAndATEConsole )
         ->then( Resources::enqueueApp( 'ate-jobs-sync' ) )
         ->then( Fns::always( make( \WPML_TM_Scripts_Factory::class ) ) )
         ->then( invoke( 'localize_script' )->with( 'wpml-ate-jobs-sync-ui' ) );
  • With:
    if (current_user_can('translate') || current_user_can('manage_options') || current_user_can('manage_translations')) {
    	Hooks::onAction( 'wp_loaded' )
    	     ->then( [ self::class, 'getData' ] )
    	     ->then( $maybeLoadStatusBarAndATEConsole )
    	     ->then( Resources::enqueueApp( 'ate-jobs-sync' ) )
    	     ->then( Fns::always( make( \WPML_TM_Scripts_Factory::class ) ) )
    	     ->then( invoke( 'localize_script' )->with( 'wpml-ate-jobs-sync-ui' ) );
    }

Still Seeing This Issue?

If updating doesn’t fix it, ask a support question and we’ll look into it with you.

Ask a support question

All known issues