helios-ag / FMElfinderBundle

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

Impossible to upload #513

Closed mreichstadt closed 9 months ago

mreichstadt commented 9 months ago

Hi, I have a problem when using your bundle. When I try to upload a file I get a blank page with "ERR_TOO_MANY_REDIRECTS". I followed your READM so I don't know what I could do. Could you help me please?

Here are my files: image image image image image

Thank you in advance

helios-ag commented 9 months ago

hi @mreichstadt Some points that I have spotted: when@test and configuration of access_control must be placed in regular place

descriptif field name in the builder, try to add config section as described here https://github.com/helios-ag/FMElfinderBundle/blob/main/docs/ckeditor-integration.md

mreichstadt commented 9 months ago

Hi, Thank you for your answer.

I don't understand what you mean in your first sentence. I did the changes as you wrote in the doc image But I got the same error at the end :-(

helios-ag commented 9 months ago

In most cases redirect loop coming from improper security configuration. here is example from my old project

    fos_ck_editor:
        default_config: my_config
        configs:
            my_config:
                allowedContent: true
                filebrowserBrowseRoute: elfinder
                filebrowserBrowseRouteParameters:
                    instance: ckeditor
#security.yaml
    role_hierarchy:
        ROLE_API: ROLE_USER
        ROLE_ADMIN: [ROLE_USER]
        ROLE_SUPER_ADMIN: [ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
    access_control:
        - { path: ^/efconnect, role: ROLE_USER }
        - { path: ^/elfinder, role: ROLE_USER }
mreichstadt commented 9 months ago

Hi, Thank you, I get a new error. Here is the content of my files. Maybe I forgot something else? image image image image image

helios-ag commented 9 months ago

Instance not found, because instance named default (renamed it in the fm_elfinder config, or vice versa) also remove when@test in the security config

mreichstadt commented 9 months ago

Oh yes thank you. I think we're close! I get this now. image

I'm so very sorry to disturb you

mreichstadt commented 9 months ago

image

mreichstadt commented 9 months ago

I managed to make it work by unzipping elfinder source in /bundles/, directly in my web folder (c:\xampp\htdocs) I didn't manage to make the bundle install it where I wanted. How can I tell it to check where I wanted it to be installed? I changed in the config files but I has no effect

helios-ag commented 9 months ago

You need to run bin/console elfinder:install

mreichstadt commented 9 months ago

Yes that is what I did. Should I changé something in thé yaml?

mreichstadt commented 9 months ago

When I launch the install it tells me it installs everything in thé right folder but the files are not there

helios-ag commented 9 months ago

Yes that is what I did. Should I changé something in thé yaml?

nope, its config aware command

When I launch the install it tells me it installs everything in thé right folder but the files are not there

never tried to work on windows machine (only via dockerized env) but you can install bundle assets by manually copying stuff

image

as I can see here, copy elfinder assets to public/bundles directory

image

should be this structure as shown above

mreichstadt commented 9 months ago

Thank you. Where should it mention to take this folder? Because it tries to get elfinder in my Root dir (under htdocs) and not in my symfony public directory?

helios-ag commented 9 months ago

So issue is resolved? Have you successfully able to see elfinder interface and upload files?

mreichstadt commented 9 months ago

I Can use it yes, the only problème remaining is that it gets elfinder always in my web root folder. I can't tell it to use the one I installed in public/assets folder

helios-ag commented 9 months ago

@mreichstadt use --docroot=public_html option to add proper output folder, totally forgot about it

mreichstadt commented 9 months ago

Ok thanks you again vert much