Help with 'Multiple Root Elements Detected

I have an odd issue on the admin panel whereby I get warnings in the console about Multiple Root Livewire elements being detected. Oddly enough, this doesn't seem to appear in my local environment. I've attached a screenshot of the errors in the console. I'm not doing anything too crazy with Filament, not using notifications etc and haven't customised it other than adding one page (however this warning appears on every page in the admin panel). Any thoughts?
9 Replies
toeknee
toeknee2y ago
Where does it occur? It means one component is rendering two divs at the parent level on the single component
wyChoong
wyChoong2y ago
Some browser extensions inject HTML and causes that
Harry
HarryOP2y ago
Occurs on every page of the admin panel I wondered this too, but I've tried it with different browsers etc and same issue
wyChoong
wyChoong2y ago
Another possible reason is your web server or cdn stripping off livewire’s HTML comment
wyChoong
wyChoong2y ago
GitHub
Multiple root elements detected. This is not supported · livewire l...
hi everybody livewire.js?id=21fa1dd78491a49255cd:12 Livewire: Multiple root elements detected. This is not supported. See docs for more information https://laravel-livewire.com/docs/2.x/rendering-c...
Harry
HarryOP2y ago
Nice thinking... let me take a look at the Cloudflare settings
wyChoong
wyChoong2y ago
If you serving thru cloudflare then 100% is that, faced that before
Harry
HarryOP2y ago
I believe you're correct 🙂 Changing a couple of CF settings removed the error for me. Thank you!
wyChoong
wyChoong2y ago
You’re welcome
Want results from more Discord servers?
Add your server