You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So this comes directly from an issue I encountered working on a personal project using Filament with the Curator plugin. I was scratching my head looking at what could be wrong with the following code, especially since I'd used very similar code elsewhere and it worked like a charm:
And maybe my eyes weren't clear for a few days, but it's only when trying to remove the x- prefix and inspecting the code again in the browser that I noticed a lot of equal signs and quotation marks going around randomly around the srcset.
And for those that glanced over and missed it, that's exactly where the problem is: there's no equal sign between srcset and its value.
I don't know how the components' parsing goes, but if seeing a tag with a proper component name is enough, then I'd love to have a way (at least in DEBUG mode) to have tiny errors like these reported. Even just something along the lines of Unexpected token TOK_QUOTE, expected TOK_EQ, a style of errors we sometimes get from PHP itself.
Blade files are one of the most complicated things to debug since, basically, the only tool we have is dd.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
So this comes directly from an issue I encountered working on a personal project using Filament with the Curator plugin. I was scratching my head looking at what could be wrong with the following code, especially since I'd used very similar code elsewhere and it worked like a charm:
And maybe my eyes weren't clear for a few days, but it's only when trying to remove the
x-
prefix and inspecting the code again in the browser that I noticed a lot of equal signs and quotation marks going around randomly around the srcset.And for those that glanced over and missed it, that's exactly where the problem is: there's no equal sign between srcset and its value.
I don't know how the components' parsing goes, but if seeing a tag with a proper component name is enough, then I'd love to have a way (at least in DEBUG mode) to have tiny errors like these reported. Even just something along the lines of
Unexpected token TOK_QUOTE, expected TOK_EQ
, a style of errors we sometimes get from PHP itself.Blade files are one of the most complicated things to debug since, basically, the only tool we have is
dd
.Thanks in advance for your consideration.
Beta Was this translation helpful? Give feedback.
All reactions