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

Ajax function - 404 in the Firefox - version 3.5.1 #4850

Closed
lrochaoliveira opened this issue Feb 23, 2021 · 6 comments
Closed

Ajax function - 404 in the Firefox - version 3.5.1 #4850

lrochaoliveira opened this issue Feb 23, 2021 · 6 comments

Comments

@lrochaoliveira
Copy link

Description

I've an application using the ajax call in the combox onchange event. When the function was called, return a 404 browser's message. The browser's stack trace:


**send** https://code.jquery.com/jquery-3.5.1.js:10099:10
**ajax** https://code.jquery.com/jquery-3.5.1.js:9682:15
**carregaComboAtivoAjax** http://localhost:8080/SSP/bootstrap/js/funcoes.js:6:7
**onchange** http://localhost:8080/SSP/cadCadastraCampo:1:22
**receiveMessage** resource://gre/actors/SelectChild.jsm:271:21
**receiveMessage** resource://gre/actors/SelectChild.jsm:471:21

  1. My js ajax function:
1 function carregaComboAtivoAjax(url) {
2    var uoId = document.getElementById('idUo').value;
3    $.ajax({
4        type: 'get',
5        url: url,
6        dataType: 'html',
7       data: { uoId: uoId },
8       success: function(data) {
9            if (data != null) {
10                $("body").html(data);
11            }
12        }
13    });
14 }
  1. My Spring Boot - Controller:
@RequestMapping(value = "./carregaComboAtivoCadastraCampo", method = RequestMethod.GET)
	public String carregaComboAtivo(@RequestParam UUID uoId,  Model model) {
          ....
}
  • What do you expect to happen? I expect the URL call my controller methods (iten 2);

  • What actually happens? I debug my ajax function in the console.log, and in the line 3, the $.ajax({ command stop working. I read some stack overflow community post that suggest to use the fisical file jquery.3.5.1 insetead of CDN url. I changed and the problem persist. I'm using jquery.3.5.1.js and jquery.3.5.1.min.js (CDN url in the head tag) + Spring Boot + Bootstrap + thymeleaf + Firefox Browser.
    The 404 is fake, because the URL is corret: http://localhost:8080/SSP/carregaComboAtivoCadastraCampo?uoId=ce83ca47-6b29-4878-98ee-6c0cb1a1cf66 and is calling the js function carregaComboAtivoAjax(url);
    In the POM.xml there is not expliced dependecy, because my application is war.

  • Which browsers are affected? Yes, the browser is affected. In the browser stack trace, I see the code lines that represente a exception code. I openned a bug issue in the firefox. However, I need to descart the jquery issue.

Link to test case

http://localhost:8080/SSP/cadCadastraCampo
P.S: Our application is in test and the code is protected. I can not share a public URL. But I think with the browser stack trace, it will possible to find the mistake.

Thanks for wall,
Best,
Luciana

@lrochaoliveira
Copy link
Author

Complement: Which browsers are affected? Firefox. I openned issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1693203

@mgol
Copy link
Member

mgol commented Feb 23, 2021

Unfortunately, we cannot debug full application code, especially when the site is not available. We need a small test case that's independent from external dependencies.

However, the fact you receive a 404 suggest either a bug in how you construct the URL or in the server itself. You may have better luck to get help in debugging this in other communities like Stack Overflow.

@mgol mgol closed this as completed Feb 23, 2021
@lrochaoliveira
Copy link
Author

It unbelievable! You close my issue in 2 minutes... The ajax is give me problem and you said that is my application, without read what I did? It's ridiculous...

@lrochaoliveira
Copy link
Author

Did you see the lines below? What they mean?
send https://code.jquery.com/jquery-3.5.1.js:10099:10
ajax https://code.jquery.com/jquery-3.5.1.js:9682:15

@lrochaoliveira
Copy link
Author

Open your code for I debug it... Do I need to put the maven dependecy. There is nothing about it in the jquery web site. What mean of that line??? Tell me only this! Ridiculous...

@mgol
Copy link
Member

mgol commented Feb 23, 2021

I’m sorry but this is the jQuery bug tracker, not a support forum. As I said, we cannot debug your full application and this report doesn’t present enough information for us to proceed. Even if there was a jQuery issue here, your report isn’t written in a way that would allow us to find it. You need to find help elsewhere.

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

No branches or pull requests

2 participants