I´m building a Drupal 7.14 Videowebsite which uses the Media Modul 7.x-1.1 (http://drupal.org/project/media) and Media Youtube (http://drupal.org/project/media_youtube)

Unfortunally there is an error when i use the displayformat "Projekktor" in Views.

Projekktor works fine if i use it only for the fieldformatting but i would like to use it as "Views Displayformat" i´m not sure what brings the error.

This are the Errormessages:

Notice: Undefined index: de in theme_views_view_projekktor() (Zeile 145 von /kunden/340992_79736/badmintonvideos/sites/all/modules/projekktor/theme/theme.inc).

Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in template_preprocess_projekktor_container() (Zeile 50 von /kunden/340992_79736/badmintonvideos/sites/all/modules/projekktor/theme/theme.inc).

Warning: Invalid argument supplied for foreach() in template_preprocess_projekktor_container() (Zeile 28 von /kunden/340992_79736/badmintonvideos/sites/all/modules/projekktor/theme/theme.inc).

Also in the admin configuration where you manage the filedisplay under:

admin/config/media/file-types/manage/video/file-display

There is following errormessage:

Notice: Undefined index: widget in projekktor_field_formatter_settings_form() (Zeile 663 von /kunden/340992_79736/badmintonvideos/sites/all/modules/projekktor/projekktor.module).

I really hope that you can give me the right startingpoint to fix that! Thanks & Cheers

Comments

trong.nguyen.tcec’s picture

Variable $instance['widget'] is NULL that made error.

<?php 
function projekktor_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state) {

....
 
if ($instance['widget']['settings']['allowed_schemes']['youtube'] == 'youtube') { 
            $form['projekktor_jcarousel'] = array(
                '#title' => t('jCarousel thumbnails'),
                '#type' => 'checkbox',
                '#default_value' => $settings['projekktor_jcarousel'],
            );
        }
 $form += projekktor_jcarousel_settings_form($settings);
return $form;

?>}

shoul be replaced with:

<?php
function projekktor_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state) {

....
 
    // Adds carousel form to media. Youtube only at present.
    if (isset($instance['widget'])) {
        if ($instance['widget']['settings']['allowed_schemes']['youtube'] == 'youtube') {
            $form['projekktor_jcarousel'] = array(
                '#title' => t('jCarousel thumbnails'),
                '#type' => 'checkbox',
                '#default_value' => $settings['projekktor_jcarousel'],
            );
        }

        // Adds the carousel form.
        $form += projekktor_jcarousel_settings_form($settings);
    }

    return $form;
}

?>
Aurochs’s picture

Did it help?