This thread is resolved. Here is a description of the problem and solution.

Problem:
Client gets this error when trying to send a page for translation to a translationservice

Batch # 1
(12) Invalid state 'translating' to complete operation
Rollback jobs...
Batch rolled back
Solution:
Clearing the website cache helped remove the error.
Usually the WPML cache does not disturb this, as sending translation jobs is a core function of the plugin regardless of the state of the page.

It is possible to disable the WPML cache by adding this line to the wp-config.php file in the WordPress root directory:

define( 'ICL_DISABLE_CACHE', true );

Relevant Documentation:

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 6 replies, has 3 voices.

Last updated by tarikY 2 years, 9 months ago.

Assigned support staff: Cristina.

Author Posts
September 18, 2017 at 6:54 pm

rebeccaK

I'm trying to send a page for translation to CloudWords on the WPML > Translation Management > Translation Basket.

Every time I try to do it I see this error:

Batch # 1
(12) Invalid state 'translating' to complete operation
Rollback jobs...
Batch rolled back

September 18, 2017 at 8:21 pm #1375776

Cristina

Hello Rebecca,

thanks for the credentials, I could log into the site.

However, I could not really reproduce the error.
I saw that there were some empty translations for the page "support". I deleted the empty translations, cleaned the WPML cache and this set the translation dashboard back to normal again.

That may have been blocking the batch to send to the service, as the last job was this page.

I set up my user as translator and created a test page, test WPML. Then I could sent a job to myself to translate to german, and I sent a job to translate to couldworks.

Both jobs got sent correctly as it appears. The finished translation appears in the translation dashboard with a green mark, and the french job sent as test to cloudworks appears in progress, but there seems no problem with the job sent.

You will see this in WPML > Translation Management in the translation dashboard list of pages.

Could you please check if you still get errors when trying to sent something to the translation service?

Kind regards,
Cristina

September 19, 2017 at 8:10 pm #1377021

rebeccaK

Hi Cristina,

you're right, I'm not getting the error when I'm sending a page for translation for the first time. But when I make some changes to a page, save it and then try to have it translated again I do get the error message.

Can you please look into it?

Thank you! 🙂

September 19, 2017 at 10:40 pm #1377128

rebeccaK

Cristina, clearing my website cache helped remove the error. Is there a way to completely turn off WPML cache so that I don't have to do this every time I re-send a page for translation?

September 20, 2017 at 7:54 am #1377421

Cristina

Hello Rebecca,

glad to hear this is just a cache problem. Usually the WPML cache does not disturb this, as sending translation jobs is a core function of the plugin regardless of the state of the page.

But if you want to disable the WPML cache, could you try adding this line to the wp-config.php file in your WordPress root directory?

define( 'ICL_DISABLE_CACHE', true );

I see that you are using also another cache plugin (WP Redis) in your site that uses the object cache.
This could be also interfering with the translation jobs if the page is being cached as object.

Please check if that could be also interfering with the WPML jobs.

Kind regards,
Cristina

September 28, 2017 at 6:15 pm #1386634

rebeccaK

Resolved, thanks! 🙂

November 9, 2017 at 7:50 am #1425484

tarikY

Hi I have the same problem but I could not solve it Batch # 1
(12) Invalid state 'translating' to complete operation
Rollback jobs...
Batch rolled back