| This is a bug in the add-item.js on index.html. The server sometimes will response with "\n</div>", and the page can't solve the situation and go to the error.
[JenkinURL]/static/944f39f7/jsbundles/add-item.js
// Init NameField
$('input[name="name"]', '#createItem').on("blur input", function() {
if (!isItemNameEmpty()) {
var itemName = $('input[name="name"]', '#createItem').val();
$.get("checkJobName", { value: itemName }).done(function(data) {
var message = parseResponseFromCheckJobName(data);
//BUG: When the checkJobName API response with "\n</div>", the message will be not '' ,message.charCodeAt(0)=10, message.lenth=1, then it will go to activateValidationMessage and will come out the above discussion situation.
if (message !== '') {
activateValidationMessage('#itemname-invalid', '.add-item-name', message);
} else {
cleanValidationMessages('.add-item-name');
showInputHelp('.add-item-name');
setFieldValidationStatus('name', true);
if (getFormValidationStatus()) {
enableSubmit(true);
}
}
});
The solve method: ''.charCodeAt(0)=NaN modyfy /static/944f39f7/jsbundles/add-item.js
if (message !== '') {
Change to --->
if (message !== '' && Number.isNaN(message.charCodeAt(0))) {
After that, it will work OK. Hope Jenkins could fix the problem quickly. |