U4-6808 - u.7.2.6 Bug on umbraco.service.js

Created by F.Ferlini 09 Jul 2015, 05:13:19 Updated by Shannon Deminick 11 Aug 2015, 09:48:08

When for some reason there is a problem on the server, the server itself catch an error. On umbraco.service.js as this point: //This is a bit of a hack to check if the error is due to a file being uploaded that is too large, // we have to just check for the existence of a string value but currently that is the best way to // do this since it's very hacky/difficult to catch this on the server if (data.indexOf("Maximum request length exceeded") >= 0) { notificationsService.error("Server error", "The uploaded file was too large, check with your site administrator to adjust the maximum size allowed"); }
if "data" variable hasn't indexOf method, a new exception override the first one and anything is displayed on umbraco admin panel.

I resolve the problem with: if (typeof data.indexOf == "function" && data.indexOf("Maximum request length exceeded") >= 0) { notificationsService.error("Server error", "The uploaded file was too large, check with your site administrator to adjust the maximum size allowed"); }

3 Attachments

Comments

Claus Jensen 06 Aug 2015, 14:04:24

PR: https://github.com/umbraco/Umbraco-CMS/pull/761


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted: Pull request

Affected versions: 7.2.3

Due in version: 7.3.0

Sprint:

Story Points:

Cycle: