Contentful logo

Contentful Community

Error on setting editor interface via Management Client

#1

I’m attempting to change the editor interface of a field via the Ruby Management Client using the example documented here.

require 'contentful/management'

client = Contentful::Management::Client.new('<content_management_api_key>')

editor_interface = client.editor_interfaces.default('<space_id>', '<content_type_id>')
editor_interface.controls[0] = {
  fieldId: 'title',
  widgetId: 'singleLine'
}
editor_interface.save

Unfortunately, it doesn’t work. I get the following error message (save method does not exist):

undefined methodsave’ for #Contentful::Management::EditorInterface:0x007fb26128d0c8 (NoMethodError)`

My contentful-management gem version is 1.10.1.

0 Likes

#2

Never mind, I find the solution from an issue ticket here. FYI for those struggling with the same problem. :slight_smile:

0 Likes