helios-ag / FMElfinderBundle

:file_folder: ElFinderBundle provides ElFinder integration with TinyMCE, CKEditor, Summernote editors
MIT License
275 stars 128 forks source link

Browser hangs when opening folder in form editor #413

Closed aveu closed 2 years ago

aveu commented 4 years ago

Describe the bug I use: symfony 4.4.10, fmElfinderBundle 10.0.4, local symfony http server (symfony server:start), Chrome 83 on macOS

I build simple form with one EfFinderType field ,like this:

        $formBuilder = $this->createFormBuilder($product)
            ->add('image', ElFinderType::class, array(
                'label' => 'Image',
                'instance' => 'form',
                'enable' => true,
                "attr" => array(
                    "class" => "form-control"
                )
            ))

My configuration is very simple:

fm_elfinder:
    instances:
        form:
            editor: form
            connector:
                roots:
                    uploads:
                        driver: LocalFileSystem
                        path: uploads

When I click in this form field new tab is opened with directory structure. Then I click 'Create new directory' button/option => enter new name => click Save. Popup 'Creating new folder..' (or sth like this) is displayed and operation takes looong seconds. After that when I try to open this folder it is impossible. In console I see many many http requests to /efconnect/form backend, ex. like this:

http://127.0.0.1:8000/efconnect/form?cmd=open&compare=&reload=1&reqid=172b7f20538e1&target=l1_Lw&tree=1
http://127.0.0.1:8000/efconnect/form?cmd=open&reqid=172b7f1a13b1cb&target=l1_ZGRk

It generates so many request that browser tab becomes irresponsible and tab hangs. All I can do is to stop http server.

The same problem occurs on my production.

Did any of you see similar problem? I have no more ideas about fixing this issue...

aveu commented 4 years ago

I tested it on firefox and there is no problem! So probably something with chrome...