Same Job processed/checkout twice by the JobCheckoutManager

Created on 15 February 2021, almost 4 years ago
Updated 11 October 2024, about 1 month ago

Problem/Motivation

In a specific (but common) use case my Job is processed twice by the JobCheckoutManager and sent twice to the Translator service.

Steps to reproduce

I have got ONLY 1 Translator provider (XTM in my use case, set up their official Tmgmt XTM module connector).
In settings (/admin/tmgmt/settings) the "Allow quick checkout" is checked;
In a Content translation UI I check 1 (or more) language and then click on the "Request Translation" to trigger the translation request process (with quick checkout);
Every language job will be sent twice to the Translation Provider, though created only one Job for its instance (@see the attached screenshot);

From some debugging I can see that this is happening (with the above setup/conditions) because in the JobCheckoutManager->checkoutAndRedirect the same Job will be managed and submitted for translation both in the JobCheckoutManager->checkoutMultiple method and, throughout the batch_set($batch) in the batchSubmit static method ...

API changes

Should this be avoided with a functional logic that impeded duplicated Jobs being sent to the Translator provider?

🐛 Bug report
Status

Needs work

Version

1.0

Component

Core

Created by

🇮🇹Italy itamair

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024