Module property type “mediaSelector” for videos (Bug?)

To be completed by the original poster:

CMS Version

Version 4.1.2 via Docker

Issue

When creating an own module via XML-file, the property type “mediaSelector” is not working as expected.

mediaSelector: image

The mediaSelector image property works as expected:

<property id="imageFile" type="mediaSelector"><title>Image File</title></property>

It renders correctly as an html select form-control with a filter:

<select data-filter-options="{&quot;type&quot;:&quot;image&quot;}" ></select>

mediaSelector: video

Following xml element should also work:

<property id="videoFile" type="mediaSelector" variant="video"><title>Video File</title><property>

But it seems there is an error in “ui\src\templates\forms\inputs\mediaSelector.hbs”, causing to render the html form as:

<select data-filter-options="{&quot;type&quot;:&quot;{{variant}}&quot;}" ></select>

The relevant code in “ui\src\templates\forms\inputs\mediaSelector.hbs”:

{{#if variant}}
    {{set "filterOptions" '{"type":"{{variant}}"}'}}
{{else}}
    {{set "filterOptions" '{"type":"image"}'}}
{{/if}}

Please verify.

Question

How can I otherwise add a “Select from Library Videos” property to my module, and assure the the corresponding video is transferred to the displays?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.