Scenario: Editable field in a view. Warning appears when Field -> Number of Values is not 1.

Warning: Invalid argument supplied for foreach() in media_field_widget_form() (line 168 of /opt/lampp/htdocs/website/sites/all/modules/media/includes/media.fields.inc).

Comments

Donit created an issue. See original summary.

Donit’s picture

Issue summary: View changes
Donit’s picture

Issue summary: View changes
Donit’s picture

The following

+ if (is_array($items)) {
    foreach ($items as $item) {
...
    }
+  }

lets the error warning disappear, but the problem remains: it doesn't work with a quantity Javascript field beside it. When attaching Media files, quantity field goes from [- 0 +] to [------- 0 +++++].

Chris Matthews’s picture

Version: 7.x-2.11 » 7.x-2.x-dev
Status: Active » Closed (outdated)

Recent versions of media have resolved most of peoples concerns and is compatible with entity translation, multilingual and various advanced configurations. Due to the high volume of inactive and most often irrelevant issues we are Closing this as (outdated). If for whatever reason this issue is important to you AND you still have issues after checking the media recipe documentation, then let us know and we will review your concerns.

Otherwise, see the recipe documentation for how to configure media and for troubleshooting tips OR refer to the media_dev distribution if you want to see a working media setup.

As mentioned, feel free to make some noise in this issue if you still feel it is important to you or someone else.

Thanks,

Media team

Donit’s picture

Status: Closed (outdated) » Active

@Chris Matthews It's outdated if a new version makes the issue obsolete. Is this the case? Your "warm words" that you've posted 1:1 on different issues say nothing. Development doesn't work like that. Test it or leave it.

Chris Matthews’s picture

@Donit, understood. In an effort to clean up the overwhelming media issue queue so that it could be more easily and properly maintained, the Drupal Media Team decided to close as "outdated" issues that met a certain criteria so I was helping accomplish that task. The media team knew there would be issues that would need to be re-opened so thank you for doing so for this issue!

joseph.olstad’s picture

Status: Active » Postponed (maintainer needs more info)

Hi Donit, could you please describe steps to reproduce "Editable field in a view."

What do you mean by editable field in a view? Is this functionality provided by a module other than 'views' or 'media' or 'file_entity' ? I'm not sure what you mean or how to reproduce this scenario.

Donit’s picture

joseph.olstad’s picture

Project: D7 Media » Editable Fields
Version: 7.x-2.x-dev » 7.x-1.x-dev
Category: Bug report » Support request
Status: Postponed (maintainer needs more info) » Active

Is this the right project?

joelpittet’s picture

Status: Active » Postponed (maintainer needs more info)

Could someone provide minimal steps to reproduce this issue?

It sounds like an integration issue between a few modules and it’s hard to tell what the problem could be without steps.

Hoping steps aren’t super involved, the bare minimum would be appreciated: which modules, what field config and which views display settings.