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
tiago.pereira
tiago.pereiraOP2y ago
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
awcodes
awcodes2y ago
sounds like the plugins js is getting loaded after Alpine is initializing instead of before.
tiago.pereira
tiago.pereiraOP2y ago
maybe but im not finding anything wrong
awcodes
awcodes2y ago
Can you show me the actual browser console error?
tiago.pereira
tiago.pereiraOP2y ago
sure
tiago.pereira
tiago.pereiraOP2y ago
just saw now its complaining about multiple root elements
awcodes
awcodes2y ago
Are you overriding any of Filaments views?
tiago.pereira
tiago.pereiraOP2y ago
have one custom just for one resource
awcodes
awcodes2y ago
Could be that something is getting loaded view wise, that maybe doesn’t have a closing tag.
tiago.pereira
tiago.pereiraOP2y ago
when viewing the resource let me try to disable the custom view for now
tiago.pereira
tiago.pereiraOP2y ago
same thing its not the multiple root elements
tiago.pereira
tiago.pereiraOP2y ago
then when i open the modal where the inputs are have this errors
awcodes
awcodes2y ago
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.
tiago.pereira
tiago.pereiraOP2y 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
awcodes
awcodes2y ago
Yea. Tough to say. Your js is getting broken somewhere.
tiago.pereira
tiago.pereiraOP2y ago
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
awcodes
awcodes2y ago
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?
tiago.pereira
tiago.pereiraOP2y ago
its the flatpickr component and the phone input i just added to test i dont think
awcodes
awcodes2y ago
So does everything work without flatpicker.
tiago.pereira
tiago.pereiraOP2y ago
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
awcodes
awcodes2y ago
Your phone input is using alpine.
tiago.pereira
tiago.pereiraOP2y ago
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
awcodes
awcodes2y ago
Yea. Something is off in the project. Not sure what without seeing the code base.
tiago.pereira
tiago.pereiraOP2y ago
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
Want results from more Discord servers?
Add your server