Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JQuery Ajax is ignored #1483

Open
DomenicoHub opened this issue Oct 18, 2023 · 6 comments
Open

JQuery Ajax is ignored #1483

DomenicoHub opened this issue Oct 18, 2023 · 6 comments

Comments

@DomenicoHub
Copy link

It does not capture Ajax requests (jQuery), while it captures Ajax requests of DataTables.

Laravel v: 10 (last)
JQuery v: 3.5.1

$.ajax({
	headers: {
		'X-CSRF-TOKEN': '{{ csrf_token() }}',
	},
	type: 'POST',
	url: '{{ route('name_route') }}',
	data: {},
}).done(function(data) {
	//
}).fail(function() {
	//
}).always(function() {
	//
});
@DomenicoHub
Copy link
Author

DomenicoHub commented Oct 18, 2023

I use this theme: https://wrapbootstrap.com/theme/smartadmin-responsive-webapp-WB0573SK0
The problem is this, removing vendor.js (includes Jquery) and add manually jquery 3.5.1, debugbar-ajax works...

vendor.js: https://we.tl/t-uSR6OFWTdx

Suggestions on some changes to make to the vendor.js file?

@parallels999
Copy link
Contributor

Wich versions of laravel-debugbar/php-debugbar are you using?

@DomenicoHub
Copy link
Author

"barryvdh/laravel-debugbar": "^3.9",

@parallels999
Copy link
Contributor

parallels999 commented Oct 18, 2023

php-debugbar:^1.19.1 uses jQuery 3.7.1(latest), look maximebf/php-debugbar@847216e

@DomenicoParisiDev
Copy link

The problem is this, removing vendor.js (includes Jquery) and add manually jquery 3.5.1, debugbar-ajax works...

I tried removing "vendor.js" and just loading jQuery 3.5.1, and it works...

@parallels999
Copy link
Contributor

parallels999 commented Oct 18, 2023

I tried removing "vendor.js" and just loading jQuery 3.5.1, and it works...

Which path?? I couldn't find any file called vendor.js

If vendor.js is on your custom theme the problem is in your side, not from this package

| Vendor files are included by default, but can be set to false.
| This can also be set to 'js' or 'css', to only include javascript or css vendor files.
| Vendor files are for css: font-awesome (including fonts) and highlight.js (css files)
| and for js: jquery and highlight.js
| So if you want syntax highlighting, set it to true.
| jQuery is set to not conflict with existing jQuery scripts.
|
*/
'include_vendors' => true,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants