Contentful: How to resolve the issue with sending content from different environments

Contentful: How to resolve the issue with sending content from different environments

Introduction

In case you have got frequent releases of new Contentful environments, you sometimes might wonder why some of the content you are trying to send for translation in XTM Cloud fails. This article explains the possible root cause and suggests solution.


Root cause & Solution

Root cause

In the vast majority of cases, the issue stems from the fact that the entry simply does not exist in your new Contentful environment, but it comes from one of the previous environments. For example, the content model (say Article, Quotation or Table) created in older environments cannot be picked up by the connector, when including them in an article that you created in the new, updated environment.

In this case, the following ERROR is displayed in XTM Cloud.

2024-10-03 13:27:36 ERROR [] [sys] [] [xtmScheduler_Worker-4]: FlowTranslationsJob.updateJobs::109 - An error occurred during import of flow translation. [PROJECT UUID=a89fed2a-4aab-42d6-9f2e-283681806244, PROJECT ID=34534646, JOB IDS=[147657, 149875, 143453, 143646], CONTE NTFUL SOURCE LANGUAGE=en, CONTENTFUL TARGET LANGUAGE=de, SPACE ID=87l57l15xjbo, ENVIRONMENT ID=master-101] java.lang.IllegalArgumentException: Given parent entry [ENTRY ID=43qPfgddDVwvWbK8OArD] doesn't exist.

That being said, the connector is NOT ABLE to pick the article from different environments.

Solution

The solution to this problem would be to use aliases. Alias is an environment that points to another environment. For example, if your master environment points to master-001, the content can be seamlessly drawn from master-001.

To put it into perspective, if you have env1 connected to the master and send content from it, everything should work fine as long as env1 remains connected. However, if you then connect another environment, env2, to the master, a problem may occur.

Untit345345345led.png