Hi,

I have used media latest dev version (7.x-2.0-alpha4) and file_entity 7.x-2.0-beta1.
Already alt and title fields are available while uploading image via wysiwyg editor. Now i want to add caption field for image.
I have added caption field at admin/structure/file-types/manage/image/fields

It keeps the caption value of a image. But when i tried to display page, it displays only image and image caption is not displayed.

How to solve this problem?

Comments

phponwebsites’s picture

Hi,

I applied patch from https://www.drupal.org/files/issues/media_wysiwyg.filter.inc_.patch to avoid display of contextual link referenced by https://www.drupal.org/node/2401811.

It is working fine. But the caption field didn't display because the view mode of file has been removed at this patch. So i removed that patch.

Now the caption text is displayed well but the contextual link also dsipalyed with caption text.

I need to avoid to display contextual link.

Now i get below error "

Warning: Invalid argument supplied for foreach() in taxonomy_field_formatter_prepare_view() (line 1677 of /Public/test/drupal7/modules/taxonomy/taxonomy.module).
Warning: Invalid argument supplied for foreach() in taxonomy_field_formatter_view() (line 1600 of /Public/drupal7/modules/taxonomy/taxonomy.module).

"

osopolar’s picture

Devin Carlson’s picture

Category: Feature request » Support request
Priority: Major » Normal
Status: Active » Fixed
Issue tags: -Add caption, -file_entity, -media, -drupal 7

Status: Fixed » Closed (fixed)

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

odizle’s picture

Sorry to reopen this, but I have the same error on my website.

Warning: Invalid argument supplied for foreach() in taxonomy_field_formatter_prepare_view() (line 1677 of /Public/test/drupal7/modules/taxonomy/taxonomy.module).
Warning: Invalid argument supplied for foreach() in taxonomy_field_formatter_view() (line 1600 of /Public/drupal7/modules/taxonomy/taxonomy.module).

I saw the 2 links @Devin Carlson send or the issues both committed to 2.7x and this is what I am using.
I also tried to us Dev version but got the same error.

Is there anything I'm doing wrong?

odizle’s picture

Just updating for future reference to anyone who might have this error.
Check this issue, this what solved the problem on my website.

Unchecking the "Override in WYSIWYG" option fixed the issue.
@ Home » Administration » Structure » File types » [File Type] » Manage fields and edit the reference fields

kenorb’s picture