}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ // In case the clear cache action fails (typically 500 from server), do not kill the entire
+ // install tool, instead show a notification that something went wrong.
+ Notification.error(
+ 'Clearing caches went wrong on the server side. Check the system for broken extensions or missing database tables and try again'
+ );
},
complete: function() {
$trigger.removeClass('disabled');
initialize: function(currentModal) {
var self = this;
this.currentModal = currentModal;
- self.getData();
+ this.getData();
currentModal.on('click', this.selectorChangeTrigger, function(e) {
e.preventDefault();
},
getData: function() {
- var self = this;
- var modalContent = this.currentModal.find(self.selectorModalBody);
+ var modalContent = this.currentModal.find(this.selectorModalBody);
$.ajax({
url: Router.getUrl('changeInstallToolPasswordGetData'),
cache: false,
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
},
change: function() {
var self = this;
- var executeToken = self.currentModal.find(this.selectorModuleContent).data('install-tool-token');
+ var modalContent = this.currentModal.find(this.selectorModalBody);
+ var executeToken = this.currentModal.find(this.selectorModuleContent).data('install-tool-token');
$.ajax({
url: Router.getUrl(),
method: 'POST',
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
},
complete: function() {
self.currentModal.find('.t3js-changeInstallToolPassword-password,.t3js-changeInstallToolPassword-password-check').val('')
initialize: function(currentModal) {
var self = this;
this.currentModal = currentModal;
- self.getStats();
+ this.getStats();
currentModal.on('click', this.selectorStatsTrigger, function(e) {
e.preventDefault();
getStats: function() {
var self = this;
- var modalContent = this.currentModal.find(self.selectorModalBody);
+ var modalContent = this.currentModal.find(this.selectorModalBody);
$.ajax({
url: Router.getUrl('clearTablesStats'),
cache: false,
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
},
clear: function(table) {
- var self = this;
- var executeToken = self.currentModal.find(this.selectorModuleContent).data('clear-tables-clear-token');
+ var modalContent = this.currentModal.find(this.selectorModalBody);
+ var executeToken = this.currentModal.find(this.selectorModuleContent).data('clear-tables-clear-token');
$.ajax({
url: Router.getUrl(),
method: 'POST',
this.getStats();
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
}
initialize: function(currentModal) {
var self = this;
this.currentModal = currentModal;
- self.getStats();
+ this.getStats();
currentModal.on('click', this.selectorStatsTrigger, function(e) {
e.preventDefault();
getStats: function() {
var self = this;
- var modalContent = this.currentModal.find(self.selectorModalBody);
+ var modalContent = this.currentModal.find(this.selectorModalBody);
$.ajax({
url: Router.getUrl('clearTypo3tempFilesStats'),
cache: false,
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
},
delete: function(folder, storageUid) {
- var self = this;
- var executeToken = self.currentModal.find(this.selectorModuleContent).data('clear-typo3temp-delete-token');
+ var modalContent = this.currentModal.find(this.selectorModalBody);
+ var executeToken = this.currentModal.find(this.selectorModuleContent).data('clear-typo3temp-delete-token');
$.ajax({
method: 'POST',
url: Router.getUrl(),
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
}
initialize: function(currentModal) {
var self = this;
this.currentModal = currentModal;
- self.getData();
+ this.getData();
- var buttonTemplateSection = $(self.selectorTemplate);
+ var buttonTemplateSection = $(this.selectorTemplate);
this.buttonTemplate = buttonTemplateSection.children().clone();
$(document).on('click', '.t3js-coreUpdate-init', function(e) {
},
getData: function() {
- var self = this;
- var modalContent = this.currentModal.find(self.selectorModalBody);
+ var modalContent = this.currentModal.find(this.selectorModalBody);
$.ajax({
url: Router.getUrl('coreUpdateGetData'),
cache: false,
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
},
*/
handleResult: function(data, successMessage) {
var canContinue = false;
+ var modalContent = this.currentModal.find(this.selectorModalBody);
this.removeLoadingMessage();
if (data.success === true) {
canContinue = true;
this.addMessage(Severity.ok, successMessage);
}
} else {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
return canContinue;
},
currentModal: {},
initialize: function(currentModal) {
- var self = this;
this.currentModal = currentModal;
- self.getData();
+ this.getData();
currentModal.on('click', this.selectorCreateTrigger, function(e) {
e.preventDefault();
},
getData: function() {
- var self = this;
- var modalContent = this.currentModal.find(self.selectorModalBody);
+ var modalContent = this.currentModal.find(this.selectorModalBody);
$.ajax({
url: Router.getUrl('createAdminGetData'),
cache: false,
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
},
create: function() {
var self = this;
- var executeToken = self.currentModal.find(this.selectorModuleContent).data('create-admin-token');
+ var modalContent = this.currentModal.find(this.selectorModalBody);
+ var executeToken = this.currentModal.find(this.selectorModuleContent).data('create-admin-token');
$.ajax({
url: Router.getUrl(),
method: 'POST',
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
- self.currentModal.find('.t3js-createAdmin-user').val('');
- self.currentModal.find('.t3js-createAdmin-password').val('');
- self.currentModal.find('.t3js-createAdmin-password-check').val('');
- self.currentModal.find('.t3js-createAdmin-system-maintainer').prop('checked', false);
+ this.currentModal.find('.t3js-createAdmin-user').val('');
+ this.currentModal.find('.t3js-createAdmin-password').val('');
+ this.currentModal.find('.t3js-createAdmin-password-check').val('');
+ this.currentModal.find('.t3js-createAdmin-system-maintainer').prop('checked', false);
}
};
});
initialize: function(currentModal) {
var self = this;
this.currentModal = currentModal;
- self.analyzeAjax();
+ this.analyzeAjax();
// Select / deselect all checkboxes
currentModal.on('click', '.t3js-databaseAnalyzer-suggestion-block-checkbox', function(e) {
analyzeAjax: function() {
var self = this;
- var modalContent = this.currentModal.find(self.selectorModalBody);
+ var modalContent = this.currentModal.find(this.selectorModalBody);
var message = ProgressBar.render(Severity.loading, 'Loading...', '');
- modalContent.find(self.selectorOutputContainer).append(message);
+ modalContent.find(this.selectorOutputContainer).append(message);
$(this.selectorExecuteTrigger).prop('disabled', true);
$(this.selectorAnalyzeTrigger).prop('disabled', true);
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
},
execute: function() {
var self = this;
- var executeToken = self.currentModal.find(self.selectorModuleContent).data('database-analyzer-execute-token');
+ var modalContent = this.currentModal.find(this.selectorModalBody);
+ var executeToken = this.currentModal.find(this.selectorModuleContent).data('database-analyzer-execute-token');
var selectedHashes = [];
- self.currentModal.find('.t3js-databaseAnalyzer-output .t3js-databaseAnalyzer-suggestion-line input:checked').each(function() {
+ this.currentModal.find('.t3js-databaseAnalyzer-output .t3js-databaseAnalyzer-suggestion-line input:checked').each(function() {
selectedHashes.push($(this).data('hash'));
});
$(this.selectorExecuteTrigger).prop('disabled', true);
self.analyzeAjax();
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
}
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ // In case the dump action fails (typically 500 from server), do not kill the entire
+ // install tool, instead show a notification that something went wrong.
+ Notification.error('Dumping autoload files went wrong on the server side. Check the system for broken extensions and try again')
},
complete: function() {
$trigger.removeClass('disabled');
this.currentModal = currentModal;
// Get status on initialize to have the badge and content ready
- self.runTests();
+ this.runTests();
currentModal.on('click', this.selectorExecuteTrigger, function(e) {
e.preventDefault();
runTests: function() {
var self = this;
- var modalContent = this.currentModal.find(self.selectorModalBody);
+ var modalContent = this.currentModal.find(this.selectorModalBody);
var $errorBadge = $(this.selectorGridderBadge);
$errorBadge.text('').hide();
var message = ProgressBar.render(Severity.loading, 'Loading...', '');
- modalContent.find(self.selectorOutputContainer).empty().append(message);
+ modalContent.find(this.selectorOutputContainer).empty().append(message);
$.ajax({
url: Router.getUrl('environmentCheckGetStatus'),
cache: false,
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
}
initialize: function(currentModal) {
var self = this;
this.currentModal = currentModal;
- self.getLoadedExtensionList();
+ this.getLoadedExtensionList();
currentModal.on('click', this.selectorCheckTrigger, function(e) {
currentModal.find(self.selectorUninstallTrigger).hide();
this.currentModal.find(this.selectorCheckTrigger).prop('disabled', true);
this.currentModal.find('.modal-loading').hide();
- const modalContent = this.currentModal.find(self.selectorModalBody);
- const $outputContainer = this.currentModal.find(self.selectorOutputContainer);
+ const modalContent = this.currentModal.find(this.selectorModalBody);
+ const $outputContainer = this.currentModal.find(this.selectorOutputContainer);
const message = ProgressBar.render(Severity.loading, 'Loading...', '');
$outputContainer.append(message);
}
},
error: function (xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
},
loadExtLocalconf: function(extension) {
- var self = this;
- var executeToken = self.currentModal.find(this.selectorModuleContent).data('extension-compat-tester-load-ext_localconf-token');
+ var executeToken = this.currentModal.find(this.selectorModuleContent).data('extension-compat-tester-load-ext_localconf-token');
var $ajax = $.ajax({
url: Router.getUrl(),
method: 'POST',
},
loadExtTables: function(extension) {
- var self = this;
- var executeToken = self.currentModal.find(this.selectorModuleContent).data('extension-compat-tester-load-ext_tables-token');
+ var executeToken = this.currentModal.find(this.selectorModuleContent).data('extension-compat-tester-load-ext_tables-token');
var $ajax = $.ajax({
url: Router.getUrl(),
method: 'POST',
*/
uninstallExtension: function(extension) {
var self = this;
- var executeToken = self.currentModal.find(self.selectorModuleContent).data('extension-compat-tester-uninstall-extension-token');
- var modalContent = self.currentModal.find(self.selectorModalBody);
+ var executeToken = this.currentModal.find(this.selectorModuleContent).data('extension-compat-tester-uninstall-extension-token');
+ var modalContent = this.currentModal.find(this.selectorModalBody);
var $outputContainer = $(this.selectorOutputContainer);
var message = ProgressBar.render(Severity.loading, 'Loading...', '');
$outputContainer.append(message);
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
}
initialize: function(currentModal) {
var self = this;
this.currentModal = currentModal;
- self.getContent();
+ this.getContent();
// Focus search field on certain user interactions
currentModal.on('keydown', function(e) {
getContent: function() {
var self = this;
- var modalContent = this.currentModal.find(self.selectorModalBody);
+ var modalContent = this.currentModal.find(this.selectorModalBody);
$.ajax({
url: Router.getUrl('extensionConfigurationGetContent'),
cache: false,
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
},
* @param {jQuery} $form The form of the current extension
*/
write: function($form) {
- var self = this;
- var executeToken = self.currentModal.find(this.selectorModuleContent).data('extension-configuration-write-token');
+ var modalContent = this.currentModal.find(this.selectorModalBody);
+ var executeToken = this.currentModal.find(this.selectorModuleContent).data('extension-configuration-write-token');
var extensionConfiguration = {};
$.each($form.serializeArray(), function() {
extensionConfiguration[this.name] = this.value;
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
}).always(function() {
initialize: function(currentModal) {
var self = this;
this.currentModal = currentModal;
- self.getData();
+ this.getData();
currentModal.on('show.bs.collapse', self.selectorExtensionContainer, function(e) {
// Scan a single extension by opening the panel
},
getData: function() {
- var self = this;
- var modalContent = this.currentModal.find(self.selectorModalBody);
+ var modalContent = this.currentModal.find(this.selectorModalBody);
$.ajax({
url: Router.getUrl('extensionScannerGetData'),
cache: false,
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
},
*/
scanAll: function($extensions) {
var self = this;
- self.currentModal.find(this.selectorExtensionContainer)
+ this.currentModal.find(this.selectorExtensionContainer)
.removeClass('panel-danger panel-warning panel-success')
.find('.panel-progress-bar')
.css('width', 0)
.attr('aria-valuenow', 0)
.find('span')
.text('0%');
- self.setProgressForAll();
+ this.setProgressForAll();
$extensions.each(function() {
var $me = $(this);
var extension = $me.data('extension');
setProgressForAll: function() {
var self = this;
// var numberOfExtensions = $(this.selectorExtensionContainer).length;
- var numberOfExtensions = self.currentModal.find(this.selectorExtensionContainer).length;
- var numberOfSuccess = self.currentModal.find(this.selectorExtensionContainer + '.t3js-extensionscan-finished.panel-success').length;
- var numberOfWarning = self.currentModal.find(this.selectorExtensionContainer + '.t3js-extensionscan-finished.panel-warning').length;
- var numberOfError = self.currentModal.find(this.selectorExtensionContainer + '.t3js-extensionscan-finished.panel-danger').length;
+ var numberOfExtensions = this.currentModal.find(this.selectorExtensionContainer).length;
+ var numberOfSuccess = this.currentModal.find(this.selectorExtensionContainer + '.t3js-extensionscan-finished.panel-success').length;
+ var numberOfWarning = this.currentModal.find(this.selectorExtensionContainer + '.t3js-extensionscan-finished.panel-warning').length;
+ var numberOfError = this.currentModal.find(this.selectorExtensionContainer + '.t3js-extensionscan-finished.panel-danger').length;
var numberOfScannedExtensions = numberOfSuccess + numberOfWarning + numberOfError;
var percent = (numberOfScannedExtensions / numberOfExtensions) * 100;
- self.currentModal.find('.t3js-extensionScanner-progress-all-extension .progress-bar')
+ var modalContent = this.currentModal.find(this.selectorModalBody);
+ this.currentModal.find('.t3js-extensionScanner-progress-all-extension .progress-bar')
.css('width', percent + '%')
.attr('aria-valuenow', percent)
.find('span')
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
}
*/
scanSingleExtension: function(extension) {
var self = this;
- var executeToken = self.currentModal.find(this.selectorModuleContent).data('extension-scanner-files-token');
- var modalContent = this.currentModal.find(self.selectorModalBody);
+ var executeToken = this.currentModal.find(this.selectorModuleContent).data('extension-scanner-files-token');
+ var modalContent = this.currentModal.find(this.selectorModalBody);
var $extensionContainer = this.currentModal.find(this.getExtensionSelector(extension));
var hitTemplate = '#t3js-extensionScanner-file-hit-template';
var restTemplate = '#t3js-extensionScanner-file-hit-rest-template';
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
}
initialize: function(currentModal) {
var self = this;
this.currentModal = currentModal;
- self.getContent();
+ this.getContent();
currentModal.on('click', this.selectorSaveTrigger, function(e) {
e.preventDefault();
},
getContent: function() {
- var self = this;
- var modalContent = this.currentModal.find(self.selectorModalBody);
+ var modalContent = this.currentModal.find(this.selectorModalBody);
$.ajax({
url: Router.getUrl('featuresGetContent'),
cache: false,
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
},
save: function() {
- var self = this;
- var executeToken = self.currentModal.find(this.selectorModuleContent).data('features-save-token');
+ var modalContent = this.currentModal.find(this.selectorModalBody);
+ var executeToken = this.currentModal.find(this.selectorModuleContent).data('features-save-token');
var postData = {};
- $(self.currentModal.find(this.selectorModuleContent + ' form').serializeArray()).each(function() {
+ $(this.currentModal.find(this.selectorModuleContent + ' form').serializeArray()).each(function() {
postData[this.name] = this.value;
});
postData['install[action]'] = 'featuresSave';
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
}
this.currentModal = currentModal;
// Get status on initialize to have the badge and content ready
- self.getStatus();
+ this.getStatus();
currentModal.on('click', this.selectorErrorFixTrigger, function(e) {
e.preventDefault();
getStatus: function() {
var self = this;
- var modalContent = this.currentModal.find(self.selectorModalBody);
+ var modalContent = this.currentModal.find(this.selectorModalBody);
var $errorBadge = $(this.selectorGridderBadge);
$errorBadge.text('').hide();
var message = ProgressBar.render(Severity.loading, 'Loading...', '');
modalContent.find(self.selectorPermissionContainer).append(message);
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
},
fix: function() {
var self = this;
+ var modalContent = this.currentModal.find(this.selectorModalBody);
var $outputContainer = this.currentModal.find(this.selectorOutputContainer);
var message = ProgressBar.render(Severity.loading, 'Loading...', '');
$outputContainer.empty().html(message);
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
},
getData: function() {
var self = this;
- var modalContent = this.currentModal.find(self.selectorModalBody);
+ var modalContent = this.currentModal.find(this.selectorModalBody);
$.ajax({
url: Router.getUrl('imageProcessingGetData'),
cache: false,
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
},
runTests: function() {
var self = this;
- var modalContent = this.currentModal.find(self.selectorModalBody);
+ var modalContent = this.currentModal.find(this.selectorModalBody);
var $twinImageTemplate = this.currentModal.find(this.selectorTwinImageTemplate);
modalContent.find(this.selectorTestContainer).each(function() {
var $container = $(this);
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
});
this.currentModal = currentModal;
// Get configuration list on modal open
- self.getData();
+ this.getData();
currentModal.on('click', this.selectorAddLanguageToggle, function(e) {
currentModal.find(self.selectorContentContainer + ' ' + self.selectorLanguageInactive).toggle();
getData: function() {
var self = this;
- var modalContent = this.currentModal.find(self.selectorModalBody);
+ var modalContent = this.currentModal.find(this.selectorModalBody);
$.ajax({
url: Router.getUrl('languagePacksGetData'),
cache: false,
self.renderNotifications();
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
},
activateLanguage: function(iso) {
var self = this;
+ var modalContent = this.currentModal.find(this.selectorModalBody);
var $outputContainer = this.currentModal.find(this.selectorOutputContainer);
var message = ProgressBar.render(Severity.loading, 'Loading...', '');
$outputContainer.empty().append(message);
data: {
'install': {
'action': 'languagePacksActivateLanguage',
- 'token': self.currentModal.find(self.selectorModuleContent).data('language-packs-activate-language-token'),
+ 'token': this.currentModal.find(this.selectorModuleContent).data('language-packs-activate-language-token'),
'iso': iso
}
},
this.getData();
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
},
deactivateLanguage: function(iso) {
var self = this;
+ var modalContent = this.currentModal.find(this.selectorModalBody);
var $outputContainer = this.currentModal.find(this.selectorOutputContainer);
var message = ProgressBar.render(Severity.loading, 'Loading...', '');
$outputContainer.empty().append(message);
this.getData();
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
},
packUpdateDone: function(updateIsoTimes, isos) {
var self = this;
+ var modalContent = this.currentModal.find(this.selectorModalBody);
var $outputContainer = this.currentModal.find(this.selectorOutputContainer);
if (this.packsUpdateDetails.handled === this.packsUpdateDetails.toHandle) {
// All done - create summary, update 'last update' of iso list, render main view
data: {
'install': {
'action': 'languagePacksUpdateIsoTimes',
- 'token': self.currentModal.find(self.selectorModuleContent).data('language-packs-update-iso-times-token'),
+ 'token': this.currentModal.find(this.selectorModuleContent).data('language-packs-update-iso-times-token'),
'isos': isos
}
},
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
} else {
initialize: function(currentModal) {
var self = this;
this.currentModal = currentModal;
- self.getContent();
+ this.getContent();
// Write out new settings
currentModal.on('click', this.selectorWriteTrigger, function() {
},
getContent: function() {
- var self = this;
- var modalContent = this.currentModal.find(self.selectorModalBody);
+ var modalContent = this.currentModal.find(this.selectorModalBody);
$.ajax({
url: Router.getUrl('localConfigurationGetContent'),
cache: false,
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
},
write: function() {
- var self = this;
- var executeToken = self.currentModal.find(this.selectorModuleContent).data('local-configuration-write-token');
+ var modalContent = this.currentModal.find(this.selectorModalBody);
+ var executeToken = this.currentModal.find(this.selectorModuleContent).data('local-configuration-write-token');
var configurationValues = {};
- self.currentModal.find('.t3js-localConfiguration-pathValue').each(function(i, element) {
+ this.currentModal.find('.t3js-localConfiguration-pathValue').each(function(i, element) {
var $element = $(element);
if ($element.attr('type') === 'checkbox') {
if (element.checked) {
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
}
},
getData: function() {
- var self = this;
- var modalContent = this.currentModal.find(self.selectorModalBody);
+ var modalContent = this.currentModal.find(this.selectorModalBody);
$.ajax({
url: Router.getUrl('mailTestGetData'),
cache: false,
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
},
send: function() {
- var self = this;
- var executeToken = self.currentModal.find(this.selectorModuleContent).data('mail-test-token');
+ var executeToken = this.currentModal.find(this.selectorModuleContent).data('mail-test-token');
var $outputContainer = this.currentModal.find(this.selectorOutputContainer);
var message = ProgressBar.render(Severity.loading, 'Loading...', '');
$outputContainer.empty().html(message);
'install': {
'action': 'mailTest',
'token': executeToken,
- 'email': self.currentModal.find('.t3js-mailTest-email').val()
+ 'email': this.currentModal.find('.t3js-mailTest-email').val()
}
},
cache: false,
initialize: function(currentModal) {
- var self = this;
this.currentModal = currentModal;
- self.getData();
+ this.getData();
},
getData: function() {
- var self = this;
- var modalContent = this.currentModal.find(self.selectorModalBody);
+ var modalContent = this.currentModal.find(this.selectorModalBody);
$.ajax({
url: Router.getUrl('phpInfoGetData'),
cache: false,
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
}
initialize: function(currentModal) {
var self = this;
this.currentModal = currentModal;
- self.getContent();
+ this.getContent();
// Load content with post data on click 'custom image executable path'
currentModal.on('click', this.selectorImageExecutableTrigger, function(e) {
},
getContent: function() {
- var self = this;
- var modalContent = this.currentModal.find(self.selectorModalBody);
+ var modalContent = this.currentModal.find(this.selectorModalBody);
$.ajax({
url: Router.getUrl('presetsGetContent'),
cache: false,
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
},
getCustomImagePathContent: function() {
- var self = this;
- var modalContent = this.currentModal.find(self.selectorModalBody);
- var presetsContentToken = self.currentModal.find(this.selectorModuleContent).data('presets-content-token');
+ var modalContent = this.currentModal.find(this.selectorModalBody);
+ var presetsContentToken = this.currentModal.find(this.selectorModuleContent).data('presets-content-token');
$.ajax({
url: Router.getUrl(),
method: 'POST',
'action': 'presetsGetContent',
'values': {
'Image': {
- 'additionalSearchPath': self.currentModal.find(this.selectorImageExecutable).val()
+ 'additionalSearchPath': this.currentModal.find(this.selectorImageExecutable).val()
}
}
}
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
},
activate: function() {
- var self = this;
- var executeToken = self.currentModal.find(this.selectorModuleContent).data('presets-activate-token');
+ var modalContent = this.currentModal.find(this.selectorModalBody);
+ var executeToken = this.currentModal.find(this.selectorModuleContent).data('presets-activate-token');
var postData = {};
- $(self.currentModal.find(this.selectorModuleContent + ' form').serializeArray()).each(function() {
+ $(this.currentModal.find(this.selectorModuleContent + ' form').serializeArray()).each(function() {
postData[this.name] = this.value;
});
postData['install[action]'] = 'presetsActivate';
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
}
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ // If reset fails on server side (typically a 500), do not crash entire install tool
+ // but render an error notification instead.
+ Notification.error('Resetting backend user uc failed. Please check the system for missing database fields and try again.');
},
complete: function() {
$trigger.removeClass('disabled');
executeSilentConfigurationUpdate: function() {
var self = this;
- self.updateLoadingInfo('Executing silent configuration update');
+ this.updateLoadingInfo('Executing silent configuration update');
$.ajax({
url: this.getUrl('executeSilentConfigurationUpdate', 'layout'),
cache: false,
*/
executeSilentLegacyExtConfExtensionConfigurationUpdate: function() {
var self = this;
- self.updateLoadingInfo('Executing silent extension configuration update');
+ this.updateLoadingInfo('Executing silent extension configuration update');
$.ajax({
url: this.getUrl('executeSilentLegacyExtConfExtensionConfigurationUpdate', 'layout'),
cache: false,
*/
executeSilentExtensionConfigurationSynchronization: function() {
var self = this;
- self.updateLoadingInfo('Executing silent extension configuration synchronization');
+ this.updateLoadingInfo('Executing silent extension configuration synchronization');
$.ajax({
url: this.getUrl('executeSilentExtensionConfigurationSynchronization', 'layout'),
cache: false,
loadMainLayout: function() {
var self = this;
var $outputContainer = $(this.selectorBody);
- self.updateLoadingInfo('Loading main layout');
+ this.updateLoadingInfo('Loading main layout');
$.ajax({
url: this.getUrl('mainLayout', 'layout'),
cache: false,
});
},
- handleAjaxError: function(xhr) {
+ handleAjaxError: function(xhr, $outputContainer) {
var message = '';
if (xhr.status === 403) {
// Install tool session expired - depending on context render error message or login
} else {
// @todo Recovery tests should be started here
var url = this.getUrl(undefined, 'upgrade');
- message = '<div class="t3js-infobox callout callout-sm callout-danger"><div class="callout-body">'
- + 'Something went wrong. Please use <b><a href="' + url + '">Check for broken'
- + ' extensions</a></b> to see if a loaded extension breaks this part of the install tool'
- + ' and unload it.</div></div>';
- $(this.selectorBody).empty().html(message);
+ message =
+ '<div class="t3js-infobox callout callout-sm callout-danger">'
+ + '<div class="callout-body">'
+ + '<p>Something went wrong. Please use <b><a href="' + url + '">Check for broken'
+ + ' extensions</a></b> to see if a loaded extension breaks this part of the install tool'
+ + ' and unload it.</p>'
+ + '<p>The box below may additionally reveal further details on what went wrong depending on your debug settings.'
+ + ' It may help to temporarily switch to debug mode using <b>Settings > Configuration Presets > Debug settings.</b></p>'
+ + '<p>If this error happens at an early state and no full exception back trace is shown, it may also help'
+ + ' to manually increase debugging output in <code>typo3conf/LocalConfiguration.php</code>:'
+ + '<code>[\'BE\'][\'debug\'] => true</code>, <code>[\'SYS\'][\'devIPmask\'] => \'*\'</code>, <code>[\'SYS\'][\'displayErrors\'] => 1</code>,'
+ + '<code>[\'SYS\][\'systemLogLevel\'] => 0</code>, <code>[\'SYS\'][\'exceptionalErrors\'] => 12290</code></p>'
+ + '</div>'
+ + '</div>'
+ + '<div class="panel-group" role="tablist" aria-multiselectable="true">'
+ + '<div class="panel panel-default panel-flat searchhit">'
+ + '<div class="panel-heading" role="tab" id="heading-error">'
+ + '<h3 class="panel-title">'
+ + '<a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse-error" aria-expanded="true" aria-controls="collapse-error" class="collapsed">'
+ + '<span class="caret"></span>'
+ + '<strong>Ajax error</strong>'
+ + '</a>'
+ +'</h3>'
+ + '</div>'
+ + '<div id="collapse-error" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading-error">'
+ + '<div class="panel-body">'
+ + xhr.responseText
+ + '</div>'
+ + '</div>'
+ + '</div>';
+
+ if (typeof $outputContainer !== 'undefined') {
+ // Write to given output container. This is typically a modal if given
+ $outputContainer.empty().html(message);
+ } else {
+ // Else write to main frame
+ $(this.selectorBody).empty().html(message);
+ }
}
},
} else {
self.showEnableInstallTool();
}
+ },
+ error: function(xhr) {
+ self.handleAjaxError(xhr);
}
});
},
if (data.success === true) {
$(self.selectorBody).empty().append(data.html);
}
+ },
+ error: function(xhr) {
+ self.handleAjaxError(xhr);
}
});
},
} else {
self.showLogin();
}
+ },
+ error: function(xhr) {
+ self.handleAjaxError(xhr);
}
});
},
if (data.success === true) {
$(self.selectorBody).empty().append(data.html);
}
+ },
+ error: function(xhr) {
+ self.handleAjaxError(xhr);
}
});
},
var message = ProgressBar.render(Severity.loading, 'Loading...', '');
$outputContainer.empty().html(message);
$.ajax({
- url: self.getUrl(),
+ url: this.getUrl(),
cache: false,
method: 'POST',
data: {
$outputContainer.empty().html(message);
});
}
+ },
+ error: function(xhr) {
+ self.handleAjaxError(xhr);
}
});
},
if (data.success === true) {
self.showEnableInstallTool();
}
+ },
+ error: function(xhr) {
+ self.handleAjaxError(xhr);
}
});
},
initialize: function(currentModal) {
- var self = this;
this.currentModal = currentModal;
- self.getData();
+ this.getData();
},
getData: function() {
- var self = this;
- var modalContent = this.currentModal.find(self.selectorModalBody);
+ var modalContent = this.currentModal.find(this.selectorModalBody);
$.ajax({
url: Router.getUrl('systemInformationGetData'),
cache: false,
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
}
});
}
else {
- self.getList();
+ this.getList();
}
currentModal.on('click', this.selectorWriteTrigger, function(e) {
getList: function() {
var self = this;
- var modalContent = this.currentModal.find(self.selectorModalBody);
+ var modalContent = this.currentModal.find(this.selectorModalBody);
$.ajax({
url: Router.getUrl('systemMaintainerGetList'),
cache: false,
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
},
write: function() {
- var self = this;
- var executeToken = self.currentModal.find(this.selectorModuleContent).data('system-maintainer-write-token');
- var selectedUsers = self.currentModal.find(this.selectorChosenField).val();
+ var modalContent = this.currentModal.find(this.selectorModalBody);
+ var executeToken = this.currentModal.find(this.selectorModuleContent).data('system-maintainer-write-token');
+ var selectedUsers = this.currentModal.find(this.selectorChosenField).val();
$.ajax({
method: 'POST',
url: Router.getUrl(),
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
}
selectorOutputContainer: '.t3js-tcaExtTablesCheck-output',
initialize: function(currentModal) {
- var self = this;
this.currentModal = currentModal;
- self.check();
+ this.check();
currentModal.on('click', this.selectorCheckTrigger, function(e) {
e.preventDefault();
self.check();
check: function() {
var self = this;
- var modalContent = this.currentModal.find(self.selectorModalBody);
+ var modalContent = this.currentModal.find(this.selectorModalBody);
var $outputContainer = $(this.selectorOutputContainer);
var message = ProgressBar.render(Severity.loading, 'Loading...', '');
$outputContainer.empty().html(message);
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
}
initialize: function(currentModal) {
var self = this;
this.currentModal = currentModal;
- self.check();
+ this.check();
currentModal.on('click', this.selectorCheckTrigger, function(e) {
e.preventDefault();
self.check();
check: function() {
var self = this;
var $outputContainer = $(this.selectorOutputContainer);
- var modalContent = this.currentModal.find(self.selectorModalBody);
+ var modalContent = this.currentModal.find(this.selectorModalBody);
var message = ProgressBar.render(Severity.loading, 'Loading...', '');
$outputContainer.empty().html(message);
$.ajax({
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
}
});
}
else {
- self.getContent();
+ this.getContent();
}
// Mark a file as read
getContent: function() {
var self = this;
- var modalContent = this.currentModal.find(self.selectorModalBody);
+ var modalContent = this.currentModal.find(this.selectorModalBody);
$.ajax({
url: Router.getUrl('upgradeDocsGetContent'),
cache: false,
self.initializeChosenSelector();
self.loadChangelogs();
}
+ },
+ error: function(xhr) {
+ Router.handleAjaxError(xhr, modalContent);
}
});
},
loadChangelogs: function() {
var self = this;
var promises = [];
+ var modalContent = this.currentModal.find(this.selectorModalBody);
this.currentModal.find(this.selectorChangeLogsForVersionContainer).each(function(index, el) {
var $request = $.ajax({
url: Router.getUrl('upgradeDocsGetChangelogForVersion'),
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
},
combinedFilterSearch: function() {
- var self = this;
- var modalContent = this.currentModal.find(self.selectorModalBody);
+ var modalContent = this.currentModal.find(this.selectorModalBody);
var $items = modalContent.find('div.item');
if (this.chosenField.val().length < 1 && this.fulltextSearchField.val().length < 1) {
$('.panel-version:not(:first) > .panel-collapse').collapse('hide');
$items.addClass('hidden').removeClass('searchhit filterhit');
// apply tags
- if (self.chosenField.val().length > 0) {
+ if (this.chosenField.val().length > 0) {
$items
.addClass('hidden')
.removeClass('filterhit');
var orTags = [];
var andTags = [];
- $.each(self.chosenField.val(), function(index, item) {
+ $.each(this.chosenField.val(), function(index, item) {
var tagFilter = '[data-item-tags*="' + item + '"]';
if (item.indexOf(':') > 0) {
orTags.push(tagFilter);
.removeClass('hidden');
}
// apply fulltext search
- var typedQuery = self.fulltextSearchField.val();
+ var typedQuery = this.fulltextSearchField.val();
modalContent.find('div.item.filterhit').each(function() {
var $item = $(this);
if ($(':contains(' + typedQuery + ')', $item).length > 0 || $('input[value*="' + typedQuery + '"]', $item).length > 0) {
},
markRead: function(element) {
- var self = this;
- var executeToken = self.currentModal.find(this.selectorModuleContent).data('upgrade-docs-mark-read-token');
+ var modalContent = this.currentModal.find(this.selectorModalBody);
+ var executeToken = this.currentModal.find(this.selectorModuleContent).data('upgrade-docs-mark-read-token');
var $button = $(element).closest('a');
$button.toggleClass('t3js-upgradeDocs-unmarkRead t3js-upgradeDocs-markRead');
$button.find('i').toggleClass('fa-check fa-ban');
- $button.closest('.panel').appendTo(self.currentModal.find('.panel-body-read'));
+ $button.closest('.panel').appendTo(this.currentModal.find('.panel-body-read'));
$.ajax({
method: 'POST',
url: Router.getUrl(),
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
},
unmarkRead: function(element) {
- var self = this;
- var executeToken = self.currentModal.find(this.selectorModuleContent).data('upgrade-docs-unmark-read-token');
+ var modalContent = this.currentModal.find(this.selectorModalBody);
+ var executeToken = this.currentModal.find(this.selectorModuleContent).data('upgrade-docs-unmark-read-token');
var $button = $(element).closest('a');
var version = $button.closest('.panel').data('item-version');
$button.toggleClass('t3js-upgradeDocs-markRead t3js-upgradeDocs-unmarkRead');
$button.find('i').toggleClass('fa-check fa-ban');
- $button.closest('.panel').appendTo(self.currentModal.find('*[data-group-version="' + version + '"] .panel-body'));
+ $button.closest('.panel').appendTo(this.currentModal.find('*[data-group-version="' + version + '"] .panel-body'));
$.ajax({
method: 'POST',
url: Router.getUrl(),
}
},
error: function(xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, modalContent);
}
});
},
}
},
error: function (xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, $outputContainer);
}
});
},
}
},
error: function (xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, $outputContainer);
}
});
},
}
},
error: function (xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, $outputContainer);
}
});
},
}
},
error: function (xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, $outputContainer);
}
});
},
}
},
error: function (xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, $outputContainer);
}
});
},
}
},
error: function (xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, $outputContainer);
}
});
},
modalContent.find(self.selectorOutputWizardsContainer).append(input);
},
error: function (xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, $outputContainer);
}
});
},
var $outputContainer = this.currentModal.find(this.selectorOutputWizardsContainer);
// modalContent.find(self.selectorOutputWizardsContainer).empty();
$outputContainer.empty().html(this.renderProgressBar('Executing "' + title + '"...'));
- this.currentModal.find(self.selectorWizardsDoneRowMarkUndone).prop("disabled", true);
+ this.currentModal.find(this.selectorWizardsDoneRowMarkUndone).prop("disabled", true);
$.ajax({
method: 'POST',
data: postData,
}
},
error: function (xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, $outputContainer);
}
});
},
}
},
error: function (xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, $outputContainer);
}
});
},
}
},
error: function (xhr) {
- Router.handleAjaxError(xhr);
+ Router.handleAjaxError(xhr, $outputContainer);
}
});
},