Salesforce

WorldServer: Save or Export errors like 'Attempting to insert an item that is already part of a collection', 'Container not found' and other errors related to 'Collection'

« Go Back

Information

 
Article TypeSolution Article
Scope/EnvironmentWorldServer
Symptoms/Context
One of the following errors occur when saving or exporting a task to a WSXZ Studio package:

Attempting to insert an item that is already part of a collection.
MarkupDataContainer_AlreadyInCollectionError
Container not found for....
The given Key was not present in the dictionary


These errors will also be visible when exporting a Task that has not been yet fixed. Mostly, this happens with source files in DOCX format.

If the export includes multiple Tasks, the error will be visible in the Export summary, but the translator might overlook it or ignore it because the other tasks have been exported. The problematic task will then appear with 0 KB file size in the package and will prevent the package to be opened with the error Root element is missing. See also

WorldServer Studio package cannot be opened because one the sdlxliff files is empty and has 0 KB file size - 'Root element is missing' error
Resolution
The errors MarkupDataContainer_AlreadyInCollectionError  and Container not found for.... are mostly fixed in WorldServer 10.4.5. in the Microsoft Word 2007-2016 or 2019 File Type.

If you encounter this error in WorldServer 10.4.5. or later version, make sure you are using the correct filter to segment your DOCX files. 

If you see this issue happening again, follow the steps below:

You can fix the issue in Browser Workbench (doable with smaller files):

1- Open the affected Task in Browser Workbench 
2- Find segments with many placeholders and click on the placeholder icon to check if the placeholder numbers in the source segment match the ones in the target segment. 
3- You will find some occurrences where there is one or more placeholders displayed in the placeholder pop-up window than in the target segment.
4- Copy the content of the target segment to a file
5- Delete the content of the target segment. If there are multiple segments affected, repeat these steps to fix all occurrences. If you work in a live-TM mode WorldServer system and the target segment was not translated, make sure you set the status to None, if it was translated, it is ok to set it to Pending Review. Note: the segment status is not relevant if you work in a NON live-tm mode system since you can save your changes wthout updating the TM.
6- Do a Save and confirm it can be done without issues.
7- Copy back the content into the target segment(s) and do another Save. It should work without errors.
9- If the Task is in Autoerror, complete the Autoerror.
10-  Remove the TM entries resulting from your Save action (Step 5-6) where the content of the target segment was removed. . If it is not in live-tm modus, only clicking on Save and Update TM in Browser Workbench would have updated the TM. If you clicked on Save only, in a non- live tm modus the TM did not get updated, hence, no further action is needed.

NOTE: this step #10 is only necessary if your WorldServer environment is in Live-TM mode. If you are not sure if your environment is in live TM mode, please refer to this article: 

How to fix the issue in Trados Studio:

If the file has too many words to be handled in Browser Workbench, it is better to work in Trados Studio. However, exporting the task/file to WSXZ package won't work because of the same error. The workaround is to use the XLIFF format:

1- Export as XLIFF format. A zip file including the XLF file will be created during export
2- Unzip the zip file and open the XLIFF file in Trados Studio as standalone file
3- Run a Tag verification in Trados Studio (Review tab/Verify)
4- Fix all tag errors (ignore any other errors such as missing translation as they are not relevant. You can also change your Verification setting to report only tag issues as errors). When fixing, make sure that the tags in the target segment match the tags in source segment.
5- Re-run the tag verification until no more errors are found
6- Save the file as target in Trados Studio. The fixed XLIFF file will be created
7- Zip it and import the ZIP file into the WorldServer project/task. If no errors appear during import, your fix was successful.
8- Now complete the Autoerror or - if the error appeared during the export in WSXZ, attempt again to export in WSXZ format.
 
Root Cause
This issue happens mainly with DOCX files segmented with the Microsoft Word 2007-2013 File Type, but it may happen also when using the Microsoft Word 2007-2016 File Type.
It has been partially fixed as a Hotfix for defect WS-9217, but unfortunately we are still seeing it.

We assume this happens when getting leverage from previous Fuzzy TM entries that were created with the Microsoft Word 2007-2013 File Type
If you are using Machine Translation, the error is unrelated to segments populated by Machine translation, but most of the time by fuzzy match segments (inserted in the target segments using the Pretranslate step). In some cases, 100% match segments include tag discrepancies so the issue might also come from 100% (although usually unlikely).
Reference
Attachment 1 
Attachment 2 
Attachment 3 
Attachment 4 
Attachment 5 

Powered by