You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From symfony 6 (with the package 'helios-ag/fm-elfinder-bundle' version 12.2.1), I overrided 'elfinder_widget.html.twig' twig template. When I set the 'homeFolder' paramater with a string value containing a subfolder path, I got an Exception because the value of 'homeFolder' must not contain a char '/'.
To Reproduce
override the 'elfinder_widget.html' template
set the value 'homeFolder' with a string containing a char '/' like this :
// content of the overrided 'elfinder_widget.html.twig' file{%blockelfinder_widget%}<inputtype="text"{{block('widget_attributes')}}{%ifvalueisnotempty%}value="{{ value }}"{%endif%}data-type="elfinder-input-field"/>{%ifenableandinstanceisdefined%}<scripttype="text/javascript"charset="utf-8">
live('click', '[data-type="elfinder-input-field"]', function (event) {letid=this.getAttribute('id');// I want to open elfinder on the directory 'criteres_memes', this directory is in the 'articles' directory, and the 'articles' directory is in the main directory 'body'varchildWin=window.open("{{path('elfinder', {'instance': instance, 'homeFolder': 'body/articles/criteres_memes' })}}?id="+id,"popupWindow","height=450, width=900");// I tried also with '/body/articles/criteres_memes' with begin slash, but the same exception occurs});
// ...
</script>{%endif%}{%endblock%}
and you get the pretty exeption bellow :
My question : is this a bug ? or maybe I must use a specific char when I want to use a path with subdirectories ? I searched everywhere where the regex '[^/]++' is defined (and get maybe more explanations), but I didn't find it !
Additional context
I don't know if its information is usefull, but I don't use easyadmin, I just installed the package 'helios-ag/fm-elfinder-bundle' for the usefull 'ElFinderType' field in my form class ;)
another information : I needed to override the template for an another issue (the elfinder popup didn't open when I create a content with a CollectionType of another entity )
Thanks for any help !
The text was updated successfully, but these errors were encountered:
Firstly, thank you for this very usefull lib !
Describe the bug
From symfony 6 (with the package 'helios-ag/fm-elfinder-bundle' version 12.2.1), I overrided 'elfinder_widget.html.twig' twig template. When I set the 'homeFolder' paramater with a string value containing a subfolder path, I got an Exception because the value of 'homeFolder' must not contain a char '/'.
To Reproduce
My question : is this a bug ? or maybe I must use a specific char when I want to use a path with subdirectories ? I searched everywhere where the regex '[^/]++' is defined (and get maybe more explanations), but I didn't find it !
Additional context
I don't know if its information is usefull, but I don't use easyadmin, I just installed the package 'helios-ag/fm-elfinder-bundle' for the usefull 'ElFinderType' field in my form class ;)
another information : I needed to override the template for an another issue (the elfinder popup didn't open when I create a content with a CollectionType of another entity )
Thanks for any help !
The text was updated successfully, but these errors were encountered: