Using MediaElement 7.x-1.0 with Libraries API 7.x-2.x-dev, installed MediaElement.js in sites/all/modules/libraries/mediaelement.

When trying to configure Manage File Display on a video, I get two:

Notice: Undefined variable: link_types in mediaelement_field_formatter_settings_form() (line 204 of /../public_html/sites/all/modules/mediaelement/mediaelement.module).

Display Settings below already show MediaElement Video as a tab even though nothing is enabled. If enabling, another MediaElement Video tab shows up. I'm assuming this is where I should enable MediaElement as the player whenever I insert a video inside the editor.

I'm trying to get this working with Wysiwyg with CKEditor on my Full HTML text format. Have I configured this wrong or did the dev branch of Media break MediaElement?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mcsolas’s picture

Ran into same error..

asalazar’s picture

I get this exact same error on a fresh in stall of MediaElement 7.x 1.0, MediaElement.js 2.1.5 and Libraries API 7.x-2.x-dev.

Display Settings below already show MediaElement Video as a tab even though nothing is enabled. If enabling, another MediaElement Video tab shows up.

When attempting to adjust the Audio file type default display settings the MediaElement Video tab appears despite it not being enabled above. If you select MediaElement Audio in the MediaElement Video tab, it enables the MediaElement Audio above and creates a second tab.

Furthermore, after you save a configuration with MediaElement Audio enabled, changes you make no longer appear to be saved.

RandalK’s picture

Status: Active » Needs review
FileSize
1.66 KB

Heres a simple little patch

Going by #948584: Wrong implementations of hook_field_formatter_settings_form() renaming form to element fixes duplicates on settings form.

Also removes #options key from the width form element fixing the undefined var error.

brianV’s picture

Status: Needs review » Reviewed & tested by the community

+1 for this patch. Technically, it's fixing two separate issue in one patch, but they both need to be fixed anyways.

Without this patch, you can't save changes to file styles, which breaks the Media module compatibility.

Dave Reid’s picture

Yep, confirmed this is a good fix.

mfer’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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

ZuluWarrior’s picture

Status: Closed (fixed) » Reviewed & tested by the community

Sub,

Can we see the above fix rolled into the 7.x-1.1 release please?

Twice now this patch has caught me out on an install! I can confirm it works with latest stable's of media related dependent modules...

Be great if this could be included, would make it much easier for folks who come along and plug it straight into media/vanilla drupal...

jackalope’s picture

Echoing ZuluWarrior – would be great to get this fix rolled into the 7.x-1.2 release!

I've also recreated the patch using the recommended git method, in case that's helpful to anyone else.

bryancasler’s picture

There is a duplicate issue que posts here #1170842: Undefined variable: link_types in mediaelement_field_formatter_settings_form().

I've marked it as a duplicate of this one.

bryancasler’s picture

I can also confirm the patch in #9 works.

zambrey’s picture

+1

robbielink’s picture

#9 worked for me - thanks!

Dave Reid’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Status: Reviewed & tested by the community » Fixed

This has now been fixed in the 7.x-1.x branch and a new release is coming soon.

Status: Fixed » Closed (fixed)

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