After updating to 7.x-1.3, I get the following error when viewing content types that use this module:

Notice: Undefined index: module in field_default_prepare_view() (line 151 of [...]/modules/field/field.default.inc).

This is occurring because field_tokens_field_display_alter() sets all the fields to visible without adding the module to the array.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jesss’s picture

Patch attached.

Deciphered’s picture

Status: Active » Needs review

Hi jesss,

Seems legitimate, but could you provide reproduction steps, as I haven't seen that issue come up? I'd like to confirm the issue and fix before committing the patch.

Status: Needs review » Needs work

The last submitted patch, 1: module_undefined-2543548-1.patch, failed testing.

Deciphered’s picture

Version: 7.x-1.3 » 7.x-1.x-dev

Patch seems to have been created incorrectly. Refer to the instructions at https://www.drupal.org/project/field_tokens/git-instructions (Creating a patch).

jesss’s picture

I'm using Field Tokens in conjunction with WYSIWYG Fields (it's a dependency). To recreate:

  1. Install and configure WYSIWYG Fields and all dependencies (including Field Tokens 7.x-1.3 or higher).
  2. Create a field on a content type that uses the WYSIWYG Field widget.
  3. Create at least one field on the same content type that doesn't use the WYSIWYG Field widget.
  4. Hide at least one field on the Manage Display tab for the view mode.
  5. Create a node that uses the WSYIWYG field and at least one of the hidden fields.
  6. View that node. You should see the error repeated for each of the fields hidden on the Manage Display tab for the view mode.

I've re-rolled the patch against 7.x-1.x-dev.

Deciphered’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 5: module_undefined-2543548-5.patch, failed testing.

Deciphered’s picture

Patch is still created incorrectly and won't apply, however if you are having trouble I will re-roll myself once I re-produce the issue.

Deciphered’s picture

Thanks for the reproduction steps, it's definitely an issue and I will get the fix committed ASAP.

  • Deciphered committed cb3d0d2 on 7.x-1.x authored by jesss
    #2543548 by jesss: Fixed undefined index module in...
Deciphered’s picture

Status: Needs work » Fixed

Fixed and committed, and a Test implemented for specified usecase.

Thanks for the bug report.

Status: Fixed » Closed (fixed)

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