Closed (cannot reproduce)
Project:
Display Suite
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 May 2011 at 10:47 UTC
Updated:
15 Sep 2011 at 21:38 UTC
Jump to comment: Most recent file
Comments
Comment #1
swentel commentedHrm, that's weird, that would suck if media sends it differently :(
Comment #2
chriz001 commentedsame problem here.
Comment #3
neurojavi commentedMedia sends a variables array with an 'element' index but DS expects an 'elements' index. So Media is sending it wrong, isn't it?
This is what I'm receiving (it looks like a form field setting array, doesn't it??). How is this happening? I don't know...
I think we should move this issue to media module, do you agree?
Comment #4
swentel commentedAre you getting these errors on display or during node edit form ? If so, somehow DS is triggered, I'll investigate myself also this weekend (which version of media are you using)
Comment #5
nerilka commentedHi,
I got almost the same problem, during the checkout of an order :
Notice : Undefined index: elements in ds_entity_variables() (line 474 in C:\wamp\www\drupal-7.0_kickstart\sites\all\modules\ds\ds.module).
Notice : Undefined index: elements in ds_entity_variables() (line 474 in C:\wamp\www\drupal-7.0_kickstart\sites\all\modules\ds\ds.module).
Notice : Undefined index: view modes in field_view_mode_settings() (line 630 dans C:\wamp\www\drupal-7.0_kickstart\modules\field\field.module).
Warning : Invalid argument supplied for foreach() dans field_view_mode_settings() (ligne 630 dans C:\wamp\www\drupal-7.0_kickstart\modules\field\field.module).
It's a fresh profile install (drupal commerce kickstart), just added a product et 'bought' it. When the checkout was done, no more warning message...
Comment #6
caschbre commentedI'm getting a similar error myself. It was weird how I came across it.
1) Navigate to admin/content
2) Click on the media tab (admin/content/media)
3) Click on the + Add file link
4) Click on the Web tab
5) Click cancel
6) Navigate to any page
If I hit refresh or navigate to another page the error messages disappear.
Notice: Undefined index: elements in ds_entity_variables() (line 474 of /example.com/sites/all/modules/contrib/ds/ds.module).
Notice: Undefined index: elements in ds_entity_variables() (line 474 of /example.com/sites/all/modules/contrib/ds/ds.module).
Notice: Undefined index: elements in ds_entity_variables() (line 474 of /example.com/sites/all/modules/contrib/ds/ds.module).
Notice: Undefined index: view modes in field_view_mode_settings() (line 630 of /example.com/modules/field/field.module).
Warning: Invalid argument supplied for foreach() in field_view_mode_settings() (line 630 of /example.com/modules/field/field.module).
Comment #7
heyyo commentedI have the same error with Drupal Commerce by creating a product (with Display Suite 7.x-1.1)
Comment #8
swentel commentedThis patch will fix the notices at least.
However, I've looked into media and I think the problem is simple, they have a theme item for their entity and this is part of hook_theme(). As you can see, they're using 'element' , but core (and also entity api) are using 'elements'. Note, I'm not sure if this is causing the error (completely untested), but it might be a hint. I'll try to investigate later (others are welcome too of course), but if this is the case, than those modules should just simple follow core.
Comment #9
khiminrm commentedsubscribe
Comment #10
anthonyR commentedConfirming the same as in #5 and #7 with Commerce on checkout, using DS 7.x-1.1
New issue post needed to split up the commerce + ds and media + ds issue?
Comment #11
swentel commented@anthonyR maybe not, I think the patch is probably just fine because
a) it fixes the notices
b) ds keeps working for normal displays of entities (and not in obscure places where entities are also used for display but DS has no business being there)
Comment #12
swentel commentedCommitted this as is. Found a couple of other minor notices with non core related entities which are gone now too.
Comment #13
betz commentedcan confirm this patch works
Comment #15
moonray commentedLatest version of DS this error is back... not necessarily related to media module for me. But the patch still works.
Comment #16
swentel commentedBut that patch is in ... I need exact lines of the notice.
Comment #17
mlncn commentedI may have reproduced the same error: #1262706: Invalid argument supplied for foreach in field_view_mode_settings() caused by ds.module
Comment #18
moonray commentedHeh... ok, so the patch uses $variables not $vars (which is what's in the file). So... basically not triggering the content of the if statement fixes the problem. Not very helpful, huh? But at least that means the contents of that if statement are where the problem is. Going to see if I can track it down.
Comment #19
moonray commentedWell, I can't find it anymore, so I guess that's a good thing.