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
{% block elfinder_widget %}
<input type="text" {{ block('widget_attributes') }} {% if value is not empty %}value="{{ value }}" {% endif %} data-type="elfinder-input-field" />
{% if enable and instance is defined %}
<script type="text/javascript" charset="utf-8">
live('click', '[data-type="elfinder-input-field"]', function (event) {
let id = 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'
var childWin = 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 )
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 !