airesvsg / acf-youtubepicker

Search and select videos on YouTube without leaving the page.
https://wordpress.org/plugins/acf-youtube-picker
50 stars 7 forks source link

Conditional selected youtube.picker remains disabled! #20

Open PsyG3n opened 5 years ago

PsyG3n commented 5 years ago

For our current project we're' using ACF Pro in combination with ACF YouTube Picker! (love this yt-picker!!!) :)

Workin with the ACF Flexible Content Field, there is a little problem:

There is a layout (export see below) with a selection of media-types -> image or video. When selecting the option video another selection (radio-buttons) gets visible to select the video-type -> youtube (youtube.picker) or mp4 (post.object). Click on the mp4.option works fine: the input-field for selecting an media.object appears. But, when selecting youtube: the field youtube.picker stays disabled! (see snapshot enclosed!)

Thank you, Kosta

`'layout_5bd038cee6546' => array(
    'key' => 'layout_5bd038cee6546',
    'name' => 'media_large',
    'label' => 'Media (groß)',
    'display' => 'block',
    'sub_fields' => array(
        array(
            'key' => 'field_5bd038fae6547',
            'label' => 'Überschrift (H2)',
            'name' => 'media_large_title',
            'type' => 'text',
            'instructions' => 'Modul- oder Bereichs-Überschrift',
            'required' => 0,
            'conditional_logic' => 0,
            'wrapper' => array(
                'width' => '',
                'class' => '',
                'id' => '',
            ),
            'default_value' => '',
            'placeholder' => '',
            'prepend' => '',
            'append' => '',
            'maxlength' => '',
        ),
        array(
            'key' => 'field_5beebf6eb6f67',
            'label' => 'Medien-Typ',
            'name' => 'media_large_media_type',
            'type' => 'radio',
            'instructions' => '',
            'required' => 0,
            'conditional_logic' => 0,
            'wrapper' => array(
                'width' => '',
                'class' => '',
                'id' => '',
            ),
            'choices' => array(
                'mlmt_image' => 'Bild',
                'mlmt_video' => 'Video',
            ),
            'allow_null' => 0,
            'other_choice' => 0,
            'default_value' => '',
            'layout' => 'horizontal',
            'return_format' => 'value',
            'save_other_choice' => 0,
        ),
        array(
            'key' => 'field_5beebff0b6f68',
            'label' => 'Bild',
            'name' => 'media_large_image',
            'type' => 'image',
            'instructions' => '',
            'required' => 0,
            'conditional_logic' => array(
                array(
                    array(
                        'field' => 'field_5beebf6eb6f67',
                        'operator' => '==',
                        'value' => 'mlmt_image',
                    ),
                ),
            ),
            'wrapper' => array(
                'width' => '',
                'class' => '',
                'id' => '',
            ),
            'return_format' => 'array',
            'preview_size' => 'thumbnail',
            'library' => 'all',
            'min_width' => '',
            'min_height' => '',
            'min_size' => '',
            'max_width' => '',
            'max_height' => '',
            'max_size' => '',
            'mime_types' => '',
        ),
        array(
            'key' => 'field_5beec043b6f69',
            'label' => 'Video-Typ',
            'name' => 'media_large_video_type',
            'type' => 'radio',
            'instructions' => '',
            'required' => 0,
            'conditional_logic' => array(
                array(
                    array(
                        'field' => 'field_5beebf6eb6f67',
                        'operator' => '==',
                        'value' => 'mlmt_video',
                    ),
                ),
            ),
            'wrapper' => array(
                'width' => '',
                'class' => '',
                'id' => '',
            ),
            'choices' => array(
                'mlvt_youtube' => 'Youtube-Video',
                'mlvt_mp4' => 'MP4-Video',
            ),
            'allow_null' => 0,
            'other_choice' => 0,
            'default_value' => '',
            'layout' => 'horizontal',
            'return_format' => 'value',
            'save_other_choice' => 0,
        ),
        array(
            'key' => 'field_5beec0b6b6f6a',
            'label' => 'Video-Youtube',
            'name' => 'media_large_video_youtube',
            'type' => 'youtubepicker',
            'instructions' => '',
            'required' => 0,
            'conditional_logic' => array(
                array(
                    array(
                        'field' => 'field_5beec043b6f69',
                        'operator' => '==',
                        'value' => 'mlvt_youtube',
                    ),
                ),
            ),
            'wrapper' => array(
                'width' => '',
                'class' => '',
                'id' => '',
            ),
            'multiple' => 0,
            'yp_advanced_options' => 0,
            'api_key' => 'AIzaSyAuHQVhEmD4m2AXL6TvADwZIxZjNogVRF0',
            'answerOptions' => array(
                0 => 'title',
                1 => 'vid',
                2 => 'url',
                3 => 'thumbs',
                4 => 'iframe',
            ),
            'channelId' => '',
            'channelType' => '',
            'eventType' => '',
            'order' => 'relevance',
            'safeSearch' => 'none',
            'videoCaption' => 'any',
            'videoDefinition' => 'any',
            'videoDimension' => 'any',
            'videoDuration' => 'any',
            'videoEmbeddable' => 'true',
            'videoLicense' => 'any',
            'videoSyndicated' => 'any',
            'videoType' => 'any',
            'videoCategoryId' => '',
            'relatedVideoId' => '',
            'topicId' => '',
            'regionCode' => '',
            'relevanceLanguage' => '',
            'maxResults' => '',
        ),
        array(
            'key' => 'field_5bf28751d7441',
            'label' => '1. MP4-Video hochladen',
            'name' => 'media_large_video_mp4_upload',
            'type' => 'image',
            'instructions' => '(nach dem Hochladen des Videos, im zweiten Schritt das hochgeladene Video selektieren/zuweisen)',
            'required' => 0,
            'conditional_logic' => array(
                array(
                    array(
                        'field' => 'field_5beec043b6f69',
                        'operator' => '==',
                        'value' => 'mlvt_mp4',
                    ),
                ),
            ),
            'wrapper' => array(
                'width' => '',
                'class' => '',
                'id' => '',
            ),
            'return_format' => 'array',
            'preview_size' => 'thumbnail',
            'library' => 'all',
            'min_width' => '',
            'min_height' => '',
            'min_size' => '',
            'max_width' => '',
            'max_height' => '',
            'max_size' => '',
            'mime_types' => '',
        ),
        array(
            'key' => 'field_5beec101b6f6b',
            'label' => '2. MP4-Video auswählen',
            'name' => 'media_large_video_mp4',
            'type' => 'post_object',
            'instructions' => '',
            'required' => 0,
            'conditional_logic' => array(
                array(
                    array(
                        'field' => 'field_5beec043b6f69',
                        'operator' => '==',
                        'value' => 'mlvt_mp4',
                    ),
                ),
            ),
            'wrapper' => array(
                'width' => '',
                'class' => '',
                'id' => '',
            ),
            'post_type' => array(
                0 => 'attachment',
            ),
            'taxonomy' => '',
            'allow_null' => 0,
            'multiple' => 0,
            'return_format' => 'object',
            'ui' => 1,
        ),
        array(
            'key' => 'field_5bd03b9ae654b',
            'label' => 'Text',
            'name' => 'media_large_text',
            'type' => 'wysiwyg',
            'instructions' => '',
            'required' => 0,
            'conditional_logic' => 0,
            'wrapper' => array(
                'width' => '',
                'class' => '',
                'id' => '',
            ),
            'default_value' => '',
            'tabs' => 'all',
            'toolbar' => 'basic',
            'media_upload' => 1,
            'delay' => 0,
        ),
        array(
            'key' => 'field_5bd03bc2e654c',
            'label' => 'Quellenangabe',
            'name' => 'media_large_media_source',
            'type' => 'text',
            'instructions' => '',
            'required' => 0,
            'conditional_logic' => 0,
            'wrapper' => array(
                'width' => '',
                'class' => '',
                'id' => '',
            ),
            'default_value' => '',
            'placeholder' => '',
            'prepend' => '',
            'append' => '',
            'maxlength' => '',
        ),
    ),
    'min' => '',
    'max' => '',
),`

acf_bug

muneer52 commented 5 years ago

I am facing same issue.