jce
jce copied to clipboard
A JCE profile, only if restricted to a specific component, is ignorated by a mediajce field in a repeatable subform
Describe the bug I've a custom component with a form composed by a mediajce field and a repeatable subform with another mediajce field inside it. I've a specific JCE profile, assigned to that component, and a default JCE profile, assigned to all components. The specific profile precedes the default profile. In my custom component form, if I open the filebrowser window from the mediajce field outside the subform, everything works well, the specific profile settings are taken into account. But when I open the window from the mediajce field inside the repeatable subform, the filebrowser uses the default profile configuration, ignoring the specific profile. Trying to assign the specific profile to "All components" makes things work. So, it seems that only for repeatable mediajce fields JCE ignores the restricted profile.
To Reproduce form xml:
<field name="filedoc" type="mediajce" required="true" label="Documento" filter="pdf, odt, doc, docx" mediatype="pdf, odt, doc, docx" />
<field
name="lista_documenti"
type="subform"
formsource="/administrator/components/com_unipgstatutoregolamenti/models/subforms/unipgmediajcesubform.xml"
label="Documenti"
description="Elenco dei Documenti dell'allegato"
hint="Elenco dei Documenti dell'allegato"
multiple="true"
layout="joomla.form.field.subform.repeatable-table"
/>
subform xml:
<form>
<fields>
<field name="descrizione" type="text" required="true" default="" label="Descrizione" description="Inserire qui la descrizione"></field>
<field name="nomefile" type="mediajce" required="true" label="Documento" filter="pdf, odt, doc, docx" mediatype="pdf, odt, doc, docx" />
</fields>
</form>
Expected behavior My custom component should take into account the specific profile settings for the mediajce field in the repeatable subform, like the field outside the subform.
Screenshots
custom componet form, with mediajce fields inside and outside a subform
** Versions ** Joomla 3.10.3 JCE 2.9.17 core
Should be fixed with commit - https://github.com/widgetfactory/jce/commit/e3f3db92574223ebb5697978a438302d104948aa
Can be tested in JCE 2.9.18 Beta - https://github.com/widgetfactory/jce/releases/tag/2.9.18-beta