Trying to delete fields in BO or using FieldDefinitionService throws error

Hi,

I’m, trying to recreate some fields that we had missing translations for.

When trying to delete the fields in BO, or by code in the DefinitionSetup.cs file I get

The instance of entity type 'FieldDataEntity' cannot be tracked because another instance with the same key value for {'OwnerId', 'Id', 'Culture', 'Index', 'ChildOwnerId', 'ChildIndex'} is already being tracked. When attaching existing entities, ensure that only one entity instance with a given key value is attached. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see the conflicting key values.

Trying to run Update on the field results in error that it cannot change culture on fields even though the field in question does not have multi-culture enabled.

I tried to remove the fields from the website template to be sure that was not the issue but it still throws the said error.

Any ideas?

Best regards
Artur O.

Litium version: 7.2.3

Any difference if you restart IIS?

Nope.

Restarted SQL server and the dev machine several times. Also did clean and redeploy etc… everything i can think of.

Can you try removing the data stored for the field and then deleting the field?

There exists a bug that sounds similar to your issue:
https://docs.litium.com/support/bugs/bug_details?id=46434

This was it,

Guess we can also confirm it for for the WebsiteTemplate part.
Had some text content / links in other language on a website template. The moment i removed the contents i could remove the fields in BO.

Thank you for the help.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.