The following notice has cropped up for me since I upgraded to Drupal 6.18. This is due to the improved reporting capabilities I am led to believe.
Notice: Undefined index: in _content_get_formatter() (line 1380 of D:\sites\testsite\sites\all\modules\cck\content.module).
This notice was occuring when I was using Views to aggregate 3 different node types with unique fields from each in the display. When the fields were being passed through to this function the $field_type variable was sometimes being set to an empty string which was causing the undefined index error that is being reported.
I'm not sure what the best way to fix this would be as I am unsure whether the function should return false or a string of 'default' in this situation.
Any help would be greatly appreciated.
Regards,
Tim
Comment | File | Size | Author |
---|---|---|---|
#10 | content formater 6.x-2.patch | 890 bytes | Bedstvie |
#9 | content formater 6.x-2.patch | 890 bytes | Bedstvie |
#6 | _content_get_formatter_be_quiet.patch | 2.1 KB | beeradb |
#3 | cck-887742.patch | 1.15 KB | mikeytown2 |
#1 | content.module.patch | 442 bytes | timhilliard |
Comments
Comment #1
timhilliard CreditAttribution: timhilliard commentedI have created a patch that seems to fix it but would like someone to check it for me.
Thanks,
Tim
Comment #2
timhilliard CreditAttribution: timhilliard commentedChanging to needs review
Comment #3
mikeytown2 CreditAttribution: mikeytown2 commentedpatch also has some white space fixes in as well...
Comment #4
yched CreditAttribution: yched commentedcommitted a different fix (http://drupal.org/cvs?commit=448974)
rather fix the error at the source rather that babysit broken calls in underlying functions.
Committed to the 2.x and 3.x branches.
Comment #6
beeradb CreditAttribution: beeradb commentedThose of us using drush_make need a patch to properly add this to our build process.
The attached patch is against 2.8.
Comment #7
yched CreditAttribution: yched commentedThks beeradb - "no commits without a patch in the queue" is definitely good practice, but I often skip it :-/
To be clear: the patch in #6 is the same as the one that got committed, and is just for history's sake. The issue is fixed in -dev (2 and 3)
Comment #8
beeradb CreditAttribution: beeradb commented@yched No problem. To be clear, my comment wasn't a criticism of you for not attaching the patch, but just an explanation as to why I'd bother to post a patch to the queue a couple weeks after it had been fixed in dev.
Wanted to make sure anyone who saw it didn't get too confused :)
Comment #9
Bedstvie CreditAttribution: Bedstvie commentedComment #10
Bedstvie CreditAttribution: Bedstvie commentedThe error occurs because of the fact that the function content_fields not always return value