Unable to login into Umbraco due to JavaScript error. When trying to log into Umbraco, on the login screen there is a script console error saying that filetypes in undefined.
The line is (line: 4747 in umbraco.services.js) which is as follows:
formatFileTypes: function (fileTypes) {
var fileTypesArray = fileTypes.split(','); //error is here!!!!!
var newFileTypesArray = [];
for (var i = 0; i < fileTypesArray.length; i++) {
var fileType = fileTypesArray[i];
if (fileType.indexOf('.') !== 0) {
fileType = '.'.concat(fileType);
}
newFileTypesArray.push(fileType);
}
return newFileTypesArray.join(',');
},
After further investigating and debugging, I have found in the that a media helper in the umbraco.controllers.js calls this method which passes in:
To solve this issue, I have tried adding extra the following config settings to the umbracosettings.config file but this does not solve the issue.
<imaging>
<!-- what file extension that should cause umbraco to create thumbnails -->
<imageFileTypes>jpeg,jpg,gif,bmp,png,tiff,tif</imageFileTypes>
<!-- what attributes that are allowed in the editor on an img tag -->
<allowedAttributes>alt,border,class,style,align,id,name,onclick,usemap</allowedAttributes>
<!-- automatically updates dimension, file size and extension attributes on upload -->
<autoFillImageProperties>
<uploadField alias="umbracoFile">
<widthFieldAlias>umbracoWidth</widthFieldAlias>
<heightFieldAlias>umbracoHeight</heightFieldAlias>
<lengthFieldAlias>umbracoBytes</lengthFieldAlias>
<extensionFieldAlias>umbracoExtension</extensionFieldAlias>
</uploadField>
</autoFillImageProperties>
</imaging>
The login screen is completely messed up showing all views for login, reset password etc as there is this script error. Has anyone had this error before and if so how did you fix it?
Normally when the backoffice is screwy like that. I normally bump the client dependency version number in the Client Dependency config file. The backoffice JS is normally pretty stable in my experience that that often fixes it.
Other times I've seen it being screwy have been when Url re-writes have change things from posts/gets by adding/removing trailing slashes and forcing lowercase urls so I'd check for things like that as well.
Finally, If those don't fix it. I'd possible download a clean install of the same version number and then replace the contents of Umbraco and UmbracoClient folders with the files from the clean install - This is very much a last resort style action though.
Thanks for the advice, unfortunately none of your suggestions worked. It is absolutely bizzare how this has happened, I have never encountered an issue like this before. Like you said, the back office is mostly reliable.
Unable to login into Umbraco due to JavaScript error
Unable to login into Umbraco due to JavaScript error. When trying to log into Umbraco, on the login screen there is a script console error saying that filetypes in undefined.
The line is (line: 4747 in umbraco.services.js) which is as follows:
After further investigating and debugging, I have found in the that a media helper in the umbraco.controllers.js calls this method which passes in:
To solve this issue, I have tried adding extra the following config settings to the umbracosettings.config file but this does not solve the issue.
The login screen is completely messed up showing all views for login, reset password etc as there is this script error. Has anyone had this error before and if so how did you fix it?
Hi Dan,
Normally when the backoffice is screwy like that. I normally bump the client dependency version number in the Client Dependency config file. The backoffice JS is normally pretty stable in my experience that that often fixes it.
Other times I've seen it being screwy have been when Url re-writes have change things from posts/gets by adding/removing trailing slashes and forcing lowercase urls so I'd check for things like that as well.
Finally, If those don't fix it. I'd possible download a clean install of the same version number and then replace the contents of Umbraco and UmbracoClient folders with the files from the clean install - This is very much a last resort style action though.
Nik
Hi Nik,
Thanks for the advice, unfortunately none of your suggestions worked. It is absolutely bizzare how this has happened, I have never encountered an issue like this before. Like you said, the back office is mostly reliable.
Thanks,
Dan
is working on a reply...