helios-ag / FMElfinderBundle

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

Blank page displayed #402

Closed lalamimhamed closed 3 years ago

lalamimhamed commented 4 years ago

Hi, I followed all steps one by one to install and configure this bundle in this project. I installed elfinder that create a folder name fmelfinder in my Public\Bundles folder, containing css and js files. I configured fm_elfinder.yaml file like that: fm_elfinder: instances: default: locale: '%locale%' editor: ckeditor connector: roots: uploads: driver: LocalFileSystem path: uploads upload_allow: ['image/png', 'image/jpg', 'image/jpeg'] upload_deny: ['all'] upload_max_size: 2M And in my fos_ckeditor.yaml file I added:

filebrowserBrowseRoute: elfinder
filebrowserBrowseRouteParameters: []

But running ckeditor on my project and clicking to add pictures, I got just a blank page without error: image

lalamimhamed commented 4 years ago

I'm using Symfony 5.

manu-sparheld commented 4 years ago

try to run php bin/console elfinder:install

lalamimhamed commented 4 years ago

try to run php bin/console elfinder:install

I do it but nothing. I also added this line:

fm_elfinder:
    assets_path: /bundles/fmelfinder
yun548 commented 4 years ago

Same issue since this week on 4.3. Temporary workaround is to manually copy the missings assets from vendor/components to your assets directory

napestershine commented 4 years ago

I just tried it on fresh installation in SF5, I got it working. Just in case if you wanna see the commit: https://github.com/napestershine/sf5/commit/56f13da4c4f2c548ff901048774f844408bc2bcc

nmariani commented 4 years ago

Hi folks ! Seems we all are having fun here with elFinder integration. Everything was working (almost) like a charm on SF5 (dev and prod environnement on localhost). But once I deployed it in live environment I got the same issue (empty page and a Javascript Error that warn me elfinder.main.js could not be loaded.)

Error: Script error for "elfinder.main" https://requirejs.org/docs/errors.html#scripterror

Did anyone get this issue fixed in the past few feeks ? @napestershine I followed the doc as you did also, and don't see what I could missed when I look at you commit.

Any feedback on this that could help me ? Thanks a lot, I must admit after a coding night any help is welcome 😅 .

nmariani commented 4 years ago

My 2 cents, to share with you @lalamimhamed. I'm pretty sure it's an environment issue (because it's working fine on my macbook and not on a remote server). So I guess it can be as simple as wrong permissions or a small gap of configuration/extensions. Anyway I just quickly (and dirty) fixed it by dowloading and versionning the main JS file. It's not a fix, just a workaround to deploy and give me more time to dive in. @lalamimhamed is it the same issue for you ?

yun548 commented 4 years ago

@nmariani did you make sure you copied the assets to th epublic folder on your server ? As per instructed on step 1 of the installation procedure.

Herz3h commented 2 years ago

Same issue, when I run: php bin/console elfinder:install it creates a /public folder even though I specified this in my composer.json:

    "extra": {
        "symfony-app-dir": "app",
        "symfony-bin-dir": "bin",
        "symfony-var-dir": "var",
        "symfony-web-dir": "web",
        "symfony-tests-dir": "tests",
        "symfony-assets-install": "relative",
        "public-dir": "web",
        "ckeditor-clear": "skip",
        "branch-alias": {
            "dev-master": "3.2-dev"
        },
        "symfony": {
            "allow-contrib": "true"
        }
    }

Edit:

Fixed by specifying additional docroot parameter doing this:

symfony console elfinder:install --docroot=web

I happen to expect fmelfinder folder to be in web/bundles/ not in public/bundles