Closed ahmad96hijazi closed 2 years ago
Uncaught Error: Unknown language: "sql"
at Object.c [as highlight] (javascript:4)
at Object.PhpDebugBar.Widgets.highlight (javascript:1278)
at itemRenderer (javascript:2080)
at child.
Same here. Never had this issue until most recent install.
This issue in exclusive to me in brave browser on ubuntu 20.04. Firefox and chrome both are working fine.
No longer true. Now showing up in firefox.
Did anyone get a solution?
Same problem for me... Anyone has a solution ?
This problem took so long time but nobody have any great solution. I just faced with it and lost 5 minutes to find a solutions : you just need add this following:
<link rel="stylesheet"
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/default.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script>
after jquery and enjoy result. god bless you
@VietTruongDev you save my day lol
In a theme I used it imports highlight js, but doesn't register 'sql' language
import hljs from 'highlight.js/lib/core';
import javascript from 'highlight.js/lib/languages/javascript';
import xml from 'highlight.js/lib/languages/xml';
const highlights = document.querySelectorAll('.highlight');
hljs.registerLanguage('xml', xml);
hljs.registerLanguage('javascript', javascript);
...
So I just added
hljs.registerLanguage('sql', javascript);
and the annoying error in the javascript console disappeared.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this issue is still present on the latest version of this library on supported Laravel versions, please let us know by replying to this issue so we can investigate further. Thank you for your contribution! Apologies for any delayed response on our side.
This problem took so long time but nobody have any great solution. I just faced with it and lost 5 minutes to find a solutions : you just need add this following:
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/default.min.css"> <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script>
after jquery and enjoy result. god bless you
koodos @VietTruongDev ❤️. it was spoiled almost a day😭😭
it might be the reason when we are using a custom theme and asset mixes. but still, I am wondering, why these resources are not injected from the package itself...
anyhow it should work. to everyone. who suffer like me ✌🏻
<link rel="stylesheet"
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/default.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script>
Where should I add this code?
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/default.min.css"> <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script>
Where should I add this code?
you add on your view.php file
In a theme I used it imports highlight js, but doesn't register 'sql' language
import hljs from 'highlight.js/lib/core'; import javascript from 'highlight.js/lib/languages/javascript'; import xml from 'highlight.js/lib/languages/xml'; const highlights = document.querySelectorAll('.highlight'); hljs.registerLanguage('xml', xml); hljs.registerLanguage('javascript', javascript); ...
So I just added
hljs.registerLanguage('sql', javascript);
and the annoying error in the javascript console disappeared.
Add this to resources/js/app.js then run : $ npm run build works for me well. Thank you for good share.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this issue is still present on the latest version of this library on supported Laravel versions, please let us know by replying to this issue so we can investigate further. Thank you for your contribution! Apologies for any delayed response on our side.
Originally posted by @stale[bot] in https://github.com/barryvdh/laravel-debugbar/issues/1110#issuecomment-731711594