This error appears when modifying a content type display which has a Field Collection, and you edit the formatter settings for a non translatable Field Collection.

Steps:

  1. Create or edit a content type
  2. Create a Field Collection field
  3. Go to the content type "Manage display"
  4. Click on the field collection field settings
  5. Save the field collection field settings

The solution is just to test for the 'translate' index ($settings['translate'] ? $settings['translate'] : '') in field_collection_field_formatter_settings_form:

    $elements['translate'] = array(
      '#type' => 'textfield',
      '#title' => t('Translate link title'),
      '#default_value' => isset($settings['translate']) ? $settings['translate'] : '',
      '#description' => t('Leave the title empty, to hide the link.'),
      '#access' => field_collection_item_is_translatable(),
    );
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dtamajon created an issue. See original summary.

dtamajon’s picture

Issue summary: View changes
joelstein’s picture

Status: Active » Needs review
FileSize
648 bytes

I had the same problem at the attached patch fixed it for me.

RgnYLDZ’s picture

I can confirm that this patch works.

renatog’s picture

Status: Needs review » Reviewed & tested by the community

Really makes sense.

Thank you very much for the catch.

  • RenatoG committed 8301e5e on 7.x-1.x authored by joelstein
    Issue #2894132 by joelstein, dtamajon, RgnYLDZ, RenatoG: Notice:...
renatog’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to the dev branch.

Thank you guys for your contributions.

Good Work and Good Weekend.

Best,

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.