The SPListItem being updated was not retrieved with all taxonomy field

SharePoint international languages and the taxonomy sets translated

SharePoint Online site comes with pack of installed languages and the recommendation there is not to try change the language setup. Therefore, I assumed everything should be fine when we try to update list item with term from a term set, but the list item field value should be the one translated in Spanish (Argentina).

SharePoint Taxonomy set in Spanish (Argentina)

Calling SharePoint REST apis to update taxonomy fields values in different languages can be tricky

Once the site was setup we've tried to update list item using the ValidateUpdateListItem REST API, but we've got the following error:

The SPListItem being updated was not retrieved with all taxonomy fields.

Then we tried to do the same using PnP PowerShell and a few more methods, but seemed the all the different apis we tried had responded with the same error.

The site hidden taxonomy list was not prepared to work with the translated term value

Every site is deployed with a hidden taxonomy list that a presume is being used as caching layer. Every time when a term is requested and it is not in that list, it is retrieved from the Term store and new list item for that term is created in the hidden list so it can be used for a next call by the SharePoint underlying system. This is the URL where the list can be found.

https://<your_tenant>.sharepoint.com/sites/<your_site>/Lists/TaxonomyHiddenList/AllItems.aspx

In my case, the issue was that the taxonomy hidden list did not have the necessary fields to let the SharePoint underlying system to save the term values for language Spanish (Argentina) as list item and we kept receiving error. If we look at the list fields we will notice that there are fields related to different language:

SharePoint Hidden Taxonomy List and the Term1033 and Path1033 fields

The TermXXXX and the PathXXXX fields are repeated in the list for many of the languages. We can say that by the LCID (the number) appended at the end in the name. The Spanish (Argentina) language that has code of 11274 was not present like Term11274 and Path11274 fields.

Adding Term11274 and Path11274 columns to the hidden taxonomy list solved my issue

After we found that these fields were not present we decided to create them in the list and this worked for me. The REST APIs stopped throwing error and update of a list item using that term set was possible.

Other possible solutions

I looked at these two solutions before my findings, but none of them were related to my issue. They might help you if my solution is not what you are looking for.

- How to fix “The SPListItem being updated was not retrieved with all taxonomy fields” error
- SharePoint 2013 – The SPListItem being updated was not retrieved with all taxonomy fields
- LCIDs available in SharePoint

Conclusion

This is an edge case that unfortunately the Microsoft support teams might not help you since usually they have knowledge for more common cases. We struggled a day or two until we find the a way to overcome the blocker, but there might be a setting or checkbox somewhere that I do not know of that should solve that issue in a better way. If you find it please leave a comment here.

Comments