Contentful logo

Contentful Community

Contentful App getting uninstalled in the process of editing content type fields

Hello good people of contenful.
We have a content type in our space/enviroment and Im using the contentful/contentful-migration api in nodejs script to edit field of a content type. Lets call it MyType.

I need to insert the help text below certain fields of a MyType, lets say field1 (type has other fields, like field2). Im using the changeEditorInterface() to do this, like so:

const mytype = migration.editContentType(‘myType’),
mytype.changeEditorInterface(
‘field1’, // field id
‘tagEditor’, // widget id for field 1
{ helpText: “Help text field1” }
);

Now all I want to do is change a help text for field1 the ‘tagEditor’ is same widgetId for field1 so Im not changing the widget for field1.

Now the field2 of MyType has custom widget installed. In Contentful parlance that is now called a Contentfull App.

Finally, the strange thing that is happening is that when I add help text to field1 with the code obove is that custom widget that was installed to field2 (previously) is now magically uninstalled!

Basicaly script does not touch the field2 in any way. The only thing it is doing successfully is adding help text to MyTpe fields just like field1.

Why the custom widget (Contentfull App) for field2 is getting uninstalled in the process is my question? Looks like a bug to us…

Is there any other better way to add help text to fields?
Any help appreciated.
Kind regards