Issue with some plugins, Alpine Expression Error
I facing a issue with a project i need to use flatpickr plugin but its not working just shows a undefined on the field, i digged a little and some others are not workign also, all complaing about Alpine Expression Error, can someone try to help me please?
24 Replies
the same plugin works fine on other projects, and fresh install of statamic, so its something with this projet
something with alpinejs thats not working but i cant found out what
sounds like the plugins js is getting loaded after Alpine is initializing instead of before.
maybe but im not finding anything wrong
Can you show me the actual browser console error?
sure
just saw now its complaining about multiple root elements
Are you overriding any of Filaments views?
have one custom just for one resource
Could be that something is getting loaded view wise, that maybe doesn’t have a closing tag.
when viewing the resource
let me try to disable the custom view for now
same thing its not the multiple root elements
then when i open the modal where the inputs are have this errors
Well you have a different error without the view, so some thing definitely off in that view. Looks like you have custom alpine components to that aren’t loading their js in the right order. Make sure your custom components are using the alpine init hook to register themselves. Also make sure you’re on the latest Filament. There was a broken release a few versions ago.
the second screenshot is when i open the modal that has the field
the first one is before open
im on the latest filament
i dont think there is any custom js loading with alpine but let try to search
Yea. Tough to say. Your js is getting broken somewhere.
yes, i already disabled some stuff i have on the service provider was the only changes i think there where made
there was wire modal and some custom css but its already disabled
Well you’re second screen shot has a custom alpine component that means it has custom js.
Do you have a js file where you are using Alpine and loading that in the admin panel?
its the flatpickr component and the phone input i just added to test
i dont think
So does everything work without flatpicker.
let me remove flatpickr and send the phone input
without those fields there is no erro but i also dont have any component using alpine js i think
Your phone input is using alpine.
it was also a plugin just installed to test, and does not work also
but they both work flatpickr and phone input on a fresh install and other projects i tested
so i dont think its the plugin but this project that has some issue
Yea. Something is off in the project. Not sure what without seeing the code base.
how can i share the code? you want access to repo? or want me to share my screen?
issue is now solved, dont know exactly what was it, i changed a lot of thing, and then when i cleared my cache again is started work, but i think it was wire modals that was loading alpinejs again