Commit 647de40
committed
Merge branch 'bugfix/Attributes-IsDirty' into release/5.1.0
If a topic is loaded in the OnTopic Editor and immediately saved without making changes, then no updates to the database should be made. In practice, however, the `LastModified` and `LastModifiedBy` attributes were getting saved in this scenario. This was due to two bugs. The first is because of a string comparison issue in the underlying `TrackedRecordCollection<>.SetValue()` used to compare attribute values; this was fixed in OnTopic 5.1.0 RC1 (OnTopicCMS/OnTopic-Library#86, f354499). The second was an issue with CRLFs (`\r\n`) getting reduced to line feeds (`\n`) in SQL's XML column, and thus mismatching form submissions which still contained CRLFs for line breaks; this was fixed by cleaning the `AttributeBindingModel.Value` before setting it via `Topic.Attributes.SetValue()` (e10c666). Together, these resolve #48.4 files changed
Lines changed: 7 additions & 6 deletions
File tree
- OnTopic.Editor.AspNetCore.Attributes
- OnTopic.Editor.AspNetCore.Host
- OnTopic.Editor.AspNetCore
- Controllers
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
447 | | - | |
| 447 | + | |
| 448 | + | |
448 | 449 | | |
449 | 450 | | |
450 | 451 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
0 commit comments