Skip to content

🐛 Bug: elFinder not working on /admin/elfinder (JS error, 404 i18n, folders cannot be opened) #78

@TanNhatCMS

Description

@TanNhatCMS

🐛 Bug: elFinder not working on /admin/elfinder (JS error, 404 i18n, folders cannot be opened)

What happened?

On Backpack v7 with Laravel-Backpack/FileManager v4, elFinder does not work correctly on the default route:

/admin/elfinder

The page loads, but elFinder fails to initialize properly and the file manager becomes partially unusable.


Console errors

Uncaught TypeError: $ is not a function
    at elfinder:650

GET /admin/js/i18n/elfinder.vi.js 404 (Not Found)

Full browser log:

elfinder:650 Uncaught TypeError: $ is not a function
elfinder.min.js GET /admin/js/i18n/elfinder.vi.js 404 (Not Found)

What did you expect to happen?

  • elFinder initializes correctly on /admin/elfinder
  • Language file loads successfully
  • Clicking on a folder opens the directory contents
  • FileManager works normally

What actually happens?

  • elFinder throws JavaScript errors during initialization
  • Language file elfinder.vi.js is requested from a non-existing path
  • Folders are displayed but cannot be opened
  • Clicking on a folder does nothing (no navigation, no content update)

How to reproduce the bug

  1. Install Backpack v7
  2. Install Laravel-Backpack/FileManager v4
  3. Login to admin panel
  4. Open /admin/elfinder
  5. Open browser DevTools
  6. Click any folder → folder does not open, JS errors appear

Environment

  • Laravel version: 12
  • Backpack CRUD version: 7.0.15
  • Laravel-Backpack/FileManager version: 4.0.1
  • PHP version: 8.3
  • Database: MySQL
  • OS: Win10
  • Browser: Chrome

Additional context

  • jQuery seems to be loaded, but $ is not available when elFinder executes

  • elFinder tries to load language file from:

    /admin/js/i18n/elfinder.vi.js
    

    but this path returns 404

  • The actual language file exists in:

    vendor/studio-42/elfinder/js/i18n/elfinder.vi.js
    
  • Because elFinder fails to initialize correctly, folder click events do not work

  • This happens on the default /admin/elfinder route, without any customization


Possible cause (guess)

  • elFinder requires global jQuery (window.$)
  • Backpack v7 does not guarantee jQuery is globally available when elFinder initializes
  • Incorrect asset base path for elFinder i18n files in FileManager v4
  • JS execution order conflict (possibly related to Vite / asset pipeline)

Screenshots

👉 Attach screenshots here:

  • /admin/elfinder UI

Image

  • Browser console errors
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions