U4-5223 - Can't save macro with large id

Created by Jeroen Breuer 15 Jul 2014, 12:24:03 Updated by Morten Christensen 16 Jul 2014, 09:45:09

I've got a website with node ids over 1.000.000. Macros also use these ids so I've got a macro with id 1000020. When I try to save this macro I get the following exception: Value was either too large or too small for an Int16.

I've looked at the source and here is the problem: dto.Id = short.Parse(entity.Id.ToString(CultureInfo.InvariantCulture)); The max value of a short is only 32767 so the value of entity.Id is too big. This website is upgraded from 6.1.6 and there it worked.

Changing short to int fixes it. There are other factories which also use short so they might also need to be updated.

Comments

Jeroen Breuer 15 Jul 2014, 12:25:05

Pull request: https://github.com/umbraco/Umbraco-CMS/pull/425


Shannon Deminick 16 Jul 2014, 03:36:24

Strange, i wonder where the logic for parsing to short came from, in any case, will fix up.


Morten Christensen 16 Jul 2014, 09:45:09

If the MacroDto.Id is in fact an integer id, its probably a copy paste error :-S


Priority: Normal

Type: Bug

State: Fixed

Assignee: Shannon Deminick

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 6.0.0, 6.1.0, 7.0.0, 7.1.0, 6.0.1, 6.0.2, 6.0.3, 6.0.4, 6.1.1, 6.0.6, 6.0.5, 6.0.7, 6.1.2, 6.2.0, 6.1.3, 6.1.4, 6.1.5, 6.1.6, 7.0.1, 7.0.2, 7.0.3, 7.0.4, 7.1.1, 7.1.2, 7.1.3, 6.2.1, 7.1.4

Due in version: 7.1.5, 6.2.2

Sprint:

Story Points:

Cycle: