Updated: Comment #57

Problem/Motivation

The array $display passed to FieldInfo::prepareInstanceDisplay() contain the array key ['type] but no value (NULL). The following code fail to set the default_formatter.

$display += array(
  'label' => 'above',
  'type' => $field_type_info['default_formatter'],
  'settings' => array(),
  'weight' => 0,
);

And you get
Undefined index: module in prepareInstanceDisplay() (line 610 of modules/field/field.info.class.inc).
all over the place.

Proposed resolution

Test and set the array value outside where the default values are populated.

$display += array(
  'label' => 'above',
  'settings' => array(),
  'weight' => 0,
);
if (empty($display['type'])) {
  $display['type'] = $field_type_info['default_formatter'];
}

Remaining tasks

None

User interface changes

None

API changes

None

Original report by @mori

Notice: Undefined index: module in _field_info_prepare_instance_display() (line 346 of /Applications/MAMP/htdocs/drupal-7.0-beta/modules/field/field.info.inc).
    * Notice: Undefined index: module in _field_info_prepare_instance_display() (line 346 of /Applications/MAMP/htdocs/drupal-7.0-beta/modules/field/field.info.inc).
    * Notice: Undefined index: module in _field_info_prepare_instance_display() (line 346 of /Applications/MAMP/htdocs/drupal-7.0-beta/modules/field/field.info.inc).
    * Notice: Undefined index: node_reference in field_ui_field_overview_form() (line 356 of /Applications/MAMP/htdocs/drupal-7.0-beta/modules/field_ui/field_ui.admin.inc).
    * Notice: Undefined index: node_reference in field_ui_existing_field_options() (line 1439 of /Applications/MAMP/htdocs/drupal-7.0-beta/modules/field_ui/field_ui.admin.inc).
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yched’s picture

Status: Active » Postponed (maintainer needs more info)

More info is needed before anything can be investigated.

An error in field_ui_field_overview_form() means you get that error while viewing some "Manage fields" page.
- for which node type ?
- what are the fields in this node type ? and their respective field types ?
- is there any field module that was enabled at some point and then disabled (maybe node_reference.module ?)
- Is that a fresh D7 install or an upgraded D6 site ?

drupal a11y’s picture

Priority: Normal » Minor

Hope this helps you:
PHP-Version: 5.2.13

from the log file:
Type php
Date Saturday, October 30, 2010 - 11:59
User admin
Location http://mori.drupal7.dev/admin/reports/fields?render=overlay
Referrer http://mori.drupal7.dev/
Message Notice: Undefined index: node_reference in field_ui_fields_list() (line 24 of /Applications/MAMP/htdocs/drupal-7.0-beta/modules/field_ui/field_ui.admin.inc).
Severity notice

Type php
Date Saturday, October 30, 2010 - 08:24
User admin
Location http://mori.drupal7.dev/admin/config/development/performance
Referrer http://mori.drupal7.dev/admin/config/development/performance
Message Notice: Undefined index: module in _field_info_prepare_instance_display() (line 346 of /Applications/MAMP/htdocs/drupal-7.0-beta/modules/field/field.info.inc).

Type php
Date Friday, October 29, 2010 - 11:56
User admin
Location http://mori.drupal7.dev/admin/structure/types/manage/mediafront-test/fie...
Referrer http://mori.drupal7.dev/admin/structure/types/manage/mediafront-test/fie...
Message Notice: Undefined index: module in _field_info_prepare_instance_display() (line 346 of /Applications/MAMP/htdocs/drupal-7.0-beta/modules/field/field.info.inc).

Type php
Date Friday, October 29, 2010 - 11:53
User admin
Location http://mori.drupal7.dev/admin/structure/types/manage/mediafront-test/fie...
Referrer http://mori.drupal7.dev/admin/structure/types/manage/mediafront-test/fie...
Message Notice: Undefined index: module in _field_info_prepare_instance_display() (line 346 of /Applications/MAMP/htdocs/drupal-7.0-beta/modules/field/field.info.inc).

Type php
Date Friday, October 29, 2010 - 11:55
User admin
Location http://mori.drupal7.dev/admin/structure/types/manage/mediafront-test/fie...
Referrer http://mori.drupal7.dev/admin/structure/types/manage/mediafront-test/fie...
Message Notice: Undefined index: module in _field_info_prepare_instance_display() (line 346 of /Applications/MAMP/htdocs/drupal-7.0-beta/modules/field/field.info.inc).

>An error in field_ui_field_overview_form() means you get that error while viewing some "Manage fields" page.
>- for which node type ?
An own created node type.

>- what are the fields in this node type ? and their respective field types ?
Label ... Name Field Widget Operations

mediafrontplayer ... field_mediafrontplayer Media Player Media Player edit delete

Multimedia-Asset ... field_media_asset Multimedia asset Media file selector edit delete

Title ... title Node module element

Body ... body Long text and summary Text area with a summary edit delete

Introduction ... field_file_video File File edit delete

Image Upload ... field_file_image Image Image edit delete

>- is there any field module that was enabled at some point and then disabled (maybe node_reference.module ?) Yes. But I can not say which ones cause I am testing a lot at the moment.

>- Is that a fresh D7 install or an upgraded D6 site ?
Fresh and clean d7b2 installation with additional modules.

All in all I currently made some module updates and was NOT able to reproduce this error.
I´ll be testing more and will inform you with details asap. Meanwhile put this issue on hold.

drupal a11y’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Think this is fixed. Could not reproduce the error.

sslam’s picture

Version: 7.0-beta2 » 7.12
Status: Closed (cannot reproduce) » Active

i have the same error

Notice: Undefined index: module in _field_info_prepare_instance_display() (line 354 of /var/www/virtual/fortem.com.ua/htdocs/modules/field/field.info.inc).
Notice: Undefined index: module in _field_info_prepare_instance_display() (line 354 of /var/www/virtual/fortem.com.ua/htdocs/modules/field/field.info.inc).
Notice: Undefined index: module in _field_info_prepare_instance_display() (line 354 of /var/www/virtual/fortem.com.ua/htdocs/modules/field/field.info.inc).
Notice: Undefined index: module in _field_info_prepare_instance_display() (line 354 of /var/www/virtual/fortem.com.ua/htdocs/modules/field/field.info.inc).
Notice: Undefined index: module in _field_info_prepare_instance_display() (line 354 of /var/www/virtual/fortem.com.ua/htdocs/modules/field/field.info.inc).
Notice: Undefined index: module in _field_info_prepare_instance_display() (line 354 of /var/www/virtual/fortem.com.ua/htdocs/modules/field/field.info.inc).
Notice: Undefined index: module in _field_info_prepare_instance_display() (line 354 of /var/www/virtual/fortem.com.ua/htdocs/modules/field/field.info.inc).
Notice: Undefined index: module in _field_info_prepare_instance_display() (line 354 of /var/www/virtual/fortem.com.ua/htdocs/modules/field/field.info.inc).
Refineo’s picture

I get this notice message

Notice: Undefined index: module in _field_info_prepare_instance_display() (line 354 of /***/modules/field/field.info.inc).

* when running update.php
* after running update.php, the message shows together with "No pending updates." .

Drupal 7.12

filijonka’s picture

Status: Active » Postponed (maintainer needs more info)

hey

read #1 and see #2 and report back with more information

Refineo’s picture

Status: Postponed (maintainer needs more info) » Active

Here is more details:

Notice: Undefined index: module in _field_info_prepare_instance_display() (line 354 of /***/modules/field/field.info.inc).

Home » Administration » Structure » Content types » Basic page

standard fields used:

Title title Node module element
Body body Long text and summary Text area with a summary edit delete
URL path settings path Path module form elements
URL redirects redirect Redirect module form elements

enabled field types:
boolean
computed (http://drupal.org/project/computed_field)
date (http://drupal.org/project/date)
date (ISO format)
date (UNIX timestamp)
decimal
email (http://drupal.org/project/email)
file
fivestar rating (http://drupal.org/project/fivestar)
float
group audience
image
integer
link
list (float)
list (integer)
list (text)
location
long text
long text and summary
node reference
node reference count
serial
term reference
text
user reference
views (http://drupal.org/project/views_field)

... (Array, 12 elements)
11: _field_info_prepare_instance_display() (Array, 2 elements)
file (String, 32 characters ) modules/field/field.info.inc:354
args (Array, 2 elements)
0 (Array, 17 elements)
translatable (String, 1 characters ) 0
entity_types (Array, 0 elements)
settings (Array, 3 elements)
storage (Array, 5 elements)
foreign keys (Array, 1 element)
indexes (Array, 1 element)
id (String, 2 characters ) 57
field_permissions (Array, 1 element)
field_name (String, 11 characters ) field_venue
type (String, 14 characters ) node_reference
module (String, 14 characters ) node_reference
active (String, 1 characters ) 1
locked (String, 1 characters ) 0
cardinality (String, 1 characters ) 1
deleted (String, 1 characters ) 0
columns (Array, 1 element)
bundles (Array, 0 elements)
1 (Array, 5 elements)
label (String, 6 characters ) hidden
type (NULL)
weight (String, 1 characters ) 5
settings (Array, 0 elements)
module (NULL)

Drupal 7.12 (upgrade from Drupal 7.11)

PHP 5.3.8

filijonka’s picture

The error says that you have a field named field_venue of type node referens, have you added that field to the basic content type or another content type? If another one, is there any other added fields to that type?

What are the display settings for this field?

Refineo’s picture

I have added this to my custom content type - Event

Title		title			Node module element		
Tags		field_tags		Term reference			Tagging module autocomplete javascript UI widget	
Body	body		Long text and summary		Text area with a summary	
URL path settings	path			Path module form elements		
URL redirects	redirect		Redirect module form elements		
Event date	field_event_date	Date				Pop-up calendar		
Venue		field_venue		Node reference			Reference from URL	
Groups audience	group_audience	Group audience			Group audience	

Display settings:

In this case "Venue" field is displayed as a rendered Teaser of another (referenced) custom content type Venue

Venue	
Label display for Venue 
Formatter for Venue 
View mode: Teaser	
filijonka’s picture

Status: Active » Closed (cannot reproduce)
alayham’s picture

I get lots of this (around 30 or more) on each admin page , less on normal page views.
Notice: Undefined index: module in _field_info_prepare_instance_display() (line 354 of /***/modules/field/field.info.inc).

the site is upgraded from D6 to D7.12, all fields migrated.

I could not notice anything upnormal in field_config or field_config_instance

Refineo’s picture

Status: Closed (cannot reproduce) » Active

I got this after mirroring one D7.12 site to another D7.12 site with drush and features.

Notice: Undefined index: module in _field_info_prepare_instance_display() (line 354 of /***/modules/field/field.info.inc).

filijonka’s picture

Status: Active » Postponed (maintainer needs more info)

we really need steps from you guys to be able to reproduce this and thereby being able to debug it.

try to install a clean instalaltion of a D7 and see if you can find the error. adding your contributed modules one by one to see if anyone of thos creating this error.

alayham’s picture

Unable to reproduce on a new installation. It happened to me on an ungrade, and I tested the upgrade twice to get the same result.

Nothing seems to be wrong, except for this warning, I don't know what I am missing.

Could this be related to the data, not to the structure?

filijonka’s picture

@refineo

when using features, what were you exporting?

Refineo’s picture

I exported most of the configuration including box*, ds* (display suite), elysia_cron*, feeds*, field*, filter*, flag*, image*, menu*, og*, profile*, rules*, taxonomy*, user*, uuid*, variables*, views*

but it was enough to export variables* only to get to the message:

Notice: Undefined index: module in _field_info_prepare_instance_display() 
(line 354 of /***/modules/field/field.info.inc).

I am trying to narrow this even further.

Refineo’s picture

Status: Postponed (maintainer needs more info) » Active

Ad #16

Notice messages appear only when using Features module with or without Strongarm

I could reduce this scenario to any variable exported to a feature using the Features and Strongarm modules.

Enabling (or disabling) any exported feature in the destination Drupal instance always causes the notice messages on page: /***/admin/structure/features

Refreshing page /***/admin/structure/features causes notice messages to disappear.

Notice: Undefined index: module in _field_info_prepare_instance_display() (line 354 of /***/modules/field/field.info.inc).

The same notice message occurs when I try to enable any other feature (not Strongarm-related).

Another notice messages related to field_ui module

I receive a lot of notices in /***/admin/reports/fields , each for different missing field but I think this is another issue:

Notice: Undefined index: comment_node_blog in _field_ui_bundle_admin_path() (line 325 of /***/modules/field_ui/field_ui.module).

Cannot directly reproduce notices reported in #1 #2

I cannot reproduce previously reported notices in
/***/admin/config/development/performance
or any other admin path (other then related to features module).

Summary

I would say this is more the Features 7.x-1.x-dev module issue then the Drupal core issue.
I also think issues reported from #4 are a bit different then those reported in #1 and in #2.

filijonka’s picture

Project: Drupal core » Features
Version: 7.12 » 7.x-1.x-dev
Component: field system » Code

good work @refineo. moving this issue over to features module.

Refineo’s picture

Project: Features » Drupal core
Version: 7.x-1.x-dev » 7.x-dev
Component: Code » field system
Status: Active » Needs review
Issue tags: +Needs tests
FileSize
929 bytes

I have debuged the error in #17 and found that the reason for the error message

Notice: Undefined index: module in _field_info_prepare_instance_display() (line 354 of /***/modules/field/field.info.inc).

was in handling of field_info_formatter_types($display['type'])

field_info_formatter_types($formatter_type = NULL)

$formatter_type: (optional) A formatter type name. If omitted, all formatter types will be returned.

Source: API information.

The case when $formatter_type is omitted, was not handled in the code of function _field_info_prepare_instance_display($field, $display).

When the array of all display types is returned as $formatter_type, there is no $formatter_type['module'] available.
I think the field system should check $formatter_type[$field_type['default_formatter']] in this case.

I provide a patch to D7 dev field to handle this in Core under /modules/field/field.info.inc.

Please review.

Status: Needs review » Needs work

The last submitted patch, field-undefined-index-module-955658-19.patch, failed testing.

Refineo’s picture

Status: Needs work » Needs review
FileSize
929 bytes

Corrected #19 patch formatting. Let's try again.

Status: Needs review » Needs work

The last submitted patch, field-undefined-index-module-955658-21.patch, failed testing.

filijonka’s picture

Version: 7.x-dev » 8.x-dev
Issue tags: +Needs steps to reproduce

ok so moving this to 8.x so we get it solved there,

@refineo do oyu think you can give us some steps on how to reproduce this error

good work btw finding this.

rfay’s picture

Version: 8.x-dev » 7.x-dev
Category: bug » support
Status: Needs work » Fixed
Issue tags: -Needs steps to reproduce

[Removed] - Sorry, I meant to post this in #1528942: FAILED: [[SimpleTest]]: [MySQL] Invalid patch format ?

Refineo’s picture

Category: support » bug
Status: Fixed » Needs review
FileSize
911 bytes

Once again, now converted EOL differently...

Status: Needs review » Needs work

The last submitted patch, field-undefined-index-module-955658-23.patch, failed testing.

Refineo’s picture

Version: 7.x-dev » 8.x-dev

So should this be 7.x or 8.x ?
I believe you start with 8.x and then move down to 7.x .

I am testing it a bit further and trying to provide the right patch file.

Refineo’s picture

Status: Needs work » Needs review
FileSize
912 bytes

I should have tested the patch with git apply --stat --check *.patch first...

Status: Needs review » Needs work

The last submitted patch, field-undefined-index-module-955658-28.patch, failed testing.

Refineo’s picture

Version: 8.x-dev » 7.x-dev
Status: Needs work » Needs review

I try 7.x-dev first...

Refineo’s picture

Refineo’s picture

Version: 7.x-dev » 8.x-dev
Status: Needs review » Needs work
Issue tags: -Needs tests

Eventually tested the patch from comment #28 successfully in D7 so I move this to D8.

Refineo’s picture

Status: Needs work » Needs review
FileSize
855 bytes

Here is the new patch for 8.x-dev tested with git apply --stat --check *.patch .

Status: Needs review » Needs work

The last submitted patch, field-undefined-index-module-955658-33.patch, failed testing.

Refineo’s picture

Status: Needs work » Needs review
Issue tags: +Needs tests
FileSize
875 bytes

Once again with a different path...

Status: Needs review » Needs work

The last submitted patch, field-undefined-index-module-955658-35.patch, failed testing.

Refineo’s picture

Status: Needs work » Needs review
FileSize
863 bytes

Hmm... strange. I try once again this time with diff --git a/modules/field/field.info.inc b/modules/field/field.info.inc

Status: Needs review » Needs work

The last submitted patch, field-undefined-index-module-955658-37.patch, failed testing.

yched’s picture

re @refineo #19 :

Thanks for the detective work !

field_info_formatter_types($display['type']) returning the array of all formatter types because $display['type'] is empty would be a bug in external code :
- either the incoming $display param has $display['type'] = '', which would be a bug in the calling code,
- either $display['type'] = 'some_unknown_formatter' *and* the field type has no 'default_formatter' property, which would be a bug in the field type module.

I'm not OK with adding
I'm ok with better proofing against the 1st case by replacing

  $display += array(
    'label' => 'above',
    'type' => $field_type['default_formatter'],
    'settings' => array(),
    'weight' => 0,
  );

(only fills in 'type' if the property is absent from $param) with :


$display += array(
'label' => 'above',
'settings' => array(),
'weight' => 0,
);
if (empty($display['type'])) {
$display['type'] = $field_type['default_formatter'];
}

Refineo’s picture

OK yched I will prepare a new patch for this now.

Refineo’s picture

Status: Needs work » Needs review
FileSize
740 bytes

Here is the new D8 patch based on yched's comment in #39.

emorency’s picture

Not sure where to post this patch for the current D7 version... Added a check for $display['module'] when null following suggestion from here http://drupal.org/node/1001060#comment-6341700

Status: Needs review » Needs work
Issue tags: -Needs tests

The last submitted patch, field-undefined-index-module-955658-42.patch, failed testing.

Issue tags: +Needs tests

The last submitted patch, field-undefined-index-module-955658-42.patch, failed testing.

filijonka’s picture

Status: Needs work » Needs review

if I get this right #41 is a patch for D8, we need to make a test for that before we make a patch for D7 (#43?).

So based on #42 I set this to needs review.

/Peter

carrierawks’s picture

Any news on this?

vregouby’s picture

I get the issue, is there a patch for D7 ?

oadaeh’s picture

Status: Needs review » Needs work

Since field formatters were converted to plugins, is this still a problem in D8?

http://drupalcode.org/project/drupal.git/commit/b149df70af393eecd8b66839...

If not, we can move this to D7 and just work on that fix.

dswier’s picture

Version: 8.x-dev » 7.x-dev
Status: Needs work » Needs review
FileSize
968 bytes

I had been using the patch in #28, but after the 7.22 update the problem is now in field.info.class.inc. Since I was getting really annoyed with all the errors in my log, I figured out what changes needed to be made to field.info.class.inc to have the same effect as the patch from #28. Attached is an updated version of the patch for D7.

oadaeh’s picture

I'm sorry to say this, but your code style will not be accepted as it stands. At least two changes need to be made:

+++ b/modules/field/field.info.class.inc
@@ -607,8 +607,12 @@ class FieldInfo {
+     } else {

The "else {" should be on the next line down from the closing brace.
http://drupal.org/coding-standards#controlstruct

+++ b/modules/field/field.info.class.inc
@@ -607,8 +607,12 @@ class FieldInfo {
+     }    // Fill in default settings for the formatter.

The comment should be on the next line down from the closing brace.
http://drupal.org/node/1354#inline

Also, I did not test the code for validity, I only read through the patch.

oadaeh’s picture

Status: Needs review » Needs work

I forgot to update the Status.

dswier’s picture

Status: Needs work » Needs review
FileSize
979 bytes

Thanks for pointing out those mistakes. Here is another attempt that should be correct as far as code style goes.

JeroenT’s picture

Hi,

I installed entity API and inline entity form. When I'm watching the "Manage fields" page of any node type I have the following errors:

Notice: Undefined index: module in FieldInfo->prepareInstanceWidget() (line 575 of /***/modules/field/field.info.class.inc).
Notice: Undefined index: module in FieldInfo->prepareInstanceDisplay() (line 610 of /***/modules/field/field.info.class.inc).
Notice: Undefined index: entityreference in field_ui_existing_field_options() (line 1545 of /***/modules/field_ui/field_ui.admin.inc).

Even after applying patch #52.

Edit: Sorry! ignore this post. There was something else wrong!

dswier’s picture

So since 7.23 was released, I had a chance to see if my patch still applies. It still applies and fixes the errors. Can anybody else try it out and confirm that it works?

boran’s picture

Patch #52 worked for me

steinmb’s picture

I think we need a Issue summary.

steinmb’s picture

Priority: Minor » Normal
Issue summary: View changes
FileSize
738 bytes

Updated the issue summary and submitted a new patch. Do this issue really need tests?

steinmb’s picture

Title: Undefined index: module in _field_info_prepare_instance_display() » Undefined index: module in FieldInfo::prepareInstanceDisplay()
steinmb’s picture

Issue summary: View changes
steinmb’s picture

Bevan’s picture

Status: Needs review » Reviewed & tested by the community

Patch solves the issue and meets coding standards. An inline comment explaining why it is not in the previous += array( would improve it.

hawkeye.twolf’s picture

Patch is RTBC, let's get this committed.

I'll update the issue summary as well, but here's a recap:

In PHP array union, the first item takes precedence. So array('foo' => NULL) + array('foo' => 'bar') results in array('foo' => NULL).

So, in our case, if $display has $type => NULL or some other value that evaluates to FALSE when cast to boolean, it causes field_info_formatter_types() to return all formatter types, which is not expected by prepareInstanceDisplay().

geerlingguy’s picture

Is this RTBC, or does it still need tests ('Needs tests' tag still present)?

David_Rothstein’s picture

Version: 7.x-dev » 8.x-dev
Status: Reviewed & tested by the community » Needs review

I don't see any resolution to the question about whether or not this is still an issue in Drupal 8 (see #48)?

Tests would at least be a really good idea here, since it's not obvious from the code why the change matters and this is therefore something that could very easily be reverted by mistake later on.

yched’s picture

This area was completely reshuffled in D8, that's irrelevant there.

Aurochs’s picture

I hv really aweful number of such mistakes everywhere - in media files fields management, media filed display settings, module saving caused that as well.

Bevan’s picture

Version: 8.0.x-dev » 7.x-dev

I am moving this back to Drupal 7 since it is irrelevant for Drupal 8 and not likely to ever get fixed if it is in that queue.

I traced this back to some fields that were incorrectly configured to display in a custom display mode (via display suite). In these examples the field in question is field_headline_image and is a field for taxonomy_term entities in the neutral vocabulary. The display mode is anonymous_modal. These are the settings as exported by features to archetype_article.features.field_instance.inc.

  $field_instances['taxonomy_term-neutral-field_headline_image'] = array(
    'bundle' => 'neutral',
    'deleted' => 0,
    'description' => '',
    'display' => array(
      'anonymous_modal' => array(
        'label' => 'hidden',
        'module' => NULL,
        'settings' => array(),
        'type' => NULL,
        'weight' => 0,
      ),
      // ...
    ),
    // ...
  );

The PHP warnings went away when I changed this to:

  $field_instances['taxonomy_term-neutral-field_headline_image'] = array(
    'bundle' => 'neutral',
    'deleted' => 0,
    'description' => '',
    'display' => array(
      'anonymous_modal' => array(
        'label' => 'above',
        'settings' => array(),
        'type' => 'hidden',
        'weight' => 0,
      ),
      // ...
    ),
    // ...
  );

Features did not notice the change. A revert was not required. I suspect this is the result of adding a custom display mode and updating feature packages without saving the display configuration UI or some other such combination of configuration steps. I do not know what the combination is.

It is also unclear to me if the bug is in Core, Features or Display suite. I do not think the bug is in the field implementations because there were four fields affected in the site where I fixed this and they were of a range of different types; text, long text and image.

However they were all in the same feature package and for the anonymous_modal display mode for taxonomy_term entities of the neutral vocabulary.

Hopefully this helps others.

steinmb’s picture

Hi Bevan :)
I have seen those 'module' => 'NULL' floating around on some sites. Tried once to trace down what it is actually used for and how it works, but gave up. Anyone know?

Some of these, I think, comes from custom fields/formatters defined in 3-part modules that was incorrectly removed from the system. By incorrect I mean. The field/formatter was not first removed from the entity (removing any data from the db) and/or the module hook_uninstall() was not run. #39 list some problems.

In my mind, the best solution would be to provide proper drupal warning instead of letting PHP throw this array warning, and having a supporting documentation on how/where to look to clean them out. The document would never be a catch all (I think) but could at least point users in the right direction.

Nicolas Bouteille’s picture

If i apply patch #57 manually, the Notice error goes away but now my whole page won't display. H1 is now "Error" and I have two new error messages displaying :
Notice : Undefined index: taxonomy_term in taxonomy_field_formatter_view() (line 1601 [pathToRoot]/modules/taxonomy/taxonomy.module).
EntityMalformedException : Missing bundle property on entity of type taxonomy_term. in entity_extract_ids() (line 7729 [pathToRoot]/includes/common.inc).

Which lead me here: https://www.drupal.org/node/2128265 and when I apply patch #17 from there is all works fine.

333martine’s picture

Running update.php ,#5, helped for me, working with D7.

Thanks.

Louis Delacretaz’s picture

Using features to creating content types produced this error for me in drupal 7.34
Fixed by applying the patch #57

cheers

priyankprajapati’s picture

I used drupal 7.36. When i disable the commerce license module that time I face this error.

Notice: Undefined index: module in FieldInfo->prepareInstanceDisplay() (line 626 of C:\xampp\htdocs\aptech_video\modules\field\field.info.class.inc).

so how can i solve this error ?

steinmb’s picture

Priority: Critical » Normal

Nothing about this is critical.

moritzz’s picture

This issue still occurs in D7-7.39. I'd call it 'Critical' due to the fact that there might be few people with the guts to patch core.

joelpittet’s picture

Status: Active » Reviewed & tested by the community

#57 solved a big fatal with some dynamic fields coming from commerce_discount.

David_Rothstein’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x - thanks!

I'm a little iffy on what exactly causes this bug and whether we're really just committing a workaround, but it has buy-in from a field system maintainer and generally seems useful, and it also does seem consistent with the code that already exists further down ("Fall back to default formatter if formatter type is not available"), since clearly if the type is FALSE or NULL or something, it's not a real formatter either.

  • David_Rothstein committed 2fd22bd on 7.x
    Issue #955658 by Refineo, dswier, steinmb, emorency, filijonka, yched,...
drupal a11y’s picture

Thanks to all helpers for the great work!

Status: Fixed » Closed (fixed)

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

mmarinescu’s picture

Hey guys, I'm getting the same error too but since I'm new to Drupal, can't figure out how to fix it from this post. Could you please help me? Where should I go to write the proposed solution? In which file? Working with drupal 7.41.

Thanks in advance!

Please note I'm not using drush.

crutch’s picture

Currently 7.41. Is this in 7.42 or 7.43 or do we still need to patch? Getting big load of these errors now.

ethomas08’s picture

Created a patch for drupal core 7.91. The undefined array key notice is triggered when editing a panel field.