Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fileupload issue with @filamentScripts #14563

Open
mokhosh opened this issue Oct 18, 2024 · 0 comments
Open

Fileupload issue with @filamentScripts #14563

mokhosh opened this issue Oct 18, 2024 · 0 comments
Labels

Comments

@mokhosh
Copy link
Contributor

mokhosh commented Oct 18, 2024

Package

filament/filament

Package Version

v3.2.119

Laravel Version

v11.28.1

Livewire Version

No response

PHP Version

8.3.12

Problem description

If you have FileUpload in a form on a Livewire component, and you add @filamentScripts you will get this JS error:

TypeError: Cannot read properties of null (reading 'insertBefore')

If you remove @filamentScripts everything works perfectly.

Expected behavior

I assumed it would be the other way around. Meaning things should not work without @filamentScripts and should work perfectly with it.

Steps to reproduce

  1. Add a form to a Livewire component
  2. Add a FileUpload to your form
  3. Add @filamentScripts to the view

Reproduction repository (issue will be closed if this is not valid)

https://github.com/mokhosh/filament-upload-bug

Relevant log output

file-upload.js?v=3.2.119.0:1 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'insertBefore')
    at Ca (file-upload.js?v=3.2.119.0:1:9468)
    at Object.replaceElement (file-upload.js?v=3.2.119.0:2:73201)
    at Wd (file-upload.js?v=3.2.119.0:2:74830)
    at Hd (file-upload.js?v=3.2.119.0:2:74871)
    at ut (file-upload.js?v=3.2.119.0:2:77076)
    at Proxy.init (file-upload.js?v=3.2.119.0:40:95660)

Donate 💰 to fund this issue

  • You can donate funding to this issue. We receive the money once the issue is completed & confirmed by you.
  • 100% of the funding will be distributed between the Filament core team to run all aspects of the project.
  • Thank you in advance for helping us make maintenance sustainable!
Fund with Polar
@mokhosh mokhosh added bug Something isn't working medium priority unconfirmed labels Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

1 participant