What is going wrong?
In some "rare" cases it might happen, that the user will get back a HTTP-error 500, because the source code behind breaks. Initially, this issue was identified by @Hamdi1992. I checked it with other BEXIS2 systems. At first, I was not able to reproduce, but only because I checked "unstructured" datasets. At least for them, the issue seems not to exist.
How is it supposed to work?
So, the system should handle on the thrown error accordingly. The user should not get the "alert"-like error message. May it is possible to mask the issue. On the other hand, there could be "simple" solutions on how to circumvent that kind of issue. By that, it either be necessary to change the source code, or the existing data within the database - and ensure that future data is inserted differently (or lets say correctly).
How can it be reproduced?
You need to find a structured dataset whereby some versions of it have NULL inside the column m_comment within the table datasetversions. Next, you have to have the following setup:
- A version
x of that dataset contains primary data.
- There is another version
y, such that x < y and the field m_comment is NULL for y - which means, that there is a newer version than x with NULL at m_comment.
- Select version
x within your BEXIS2 system.
- Go to
Primary Data.
- Wait a bit and get the error (HTTP-error 500).
Within the source code, there is a count on data changes from between version x and newer version to decide from where the primary data should be loaded. But there are some entries that have NULL, so the check will break.
|
int numberNewerDataVersions = dm.GetDatasetVersions(datasetID).Where(x => x.Id > versionId).Count(x => x.ModificationInfo.Comment.Contains("Data")); |
Do you get any exceptions?
Yes, please check out the screen.

What is going wrong?
In some "rare" cases it might happen, that the user will get back a HTTP-error 500, because the source code behind breaks. Initially, this issue was identified by @Hamdi1992. I checked it with other BEXIS2 systems. At first, I was not able to reproduce, but only because I checked "unstructured" datasets. At least for them, the issue seems not to exist.
How is it supposed to work?
So, the system should handle on the thrown error accordingly. The user should not get the "alert"-like error message. May it is possible to mask the issue. On the other hand, there could be "simple" solutions on how to circumvent that kind of issue. By that, it either be necessary to change the source code, or the existing data within the database - and ensure that future data is inserted differently (or lets say correctly).
How can it be reproduced?
You need to find a structured dataset whereby some versions of it have
NULLinside the columnm_commentwithin the tabledatasetversions. Next, you have to have the following setup:xof that dataset contains primary data.y, such thatx<yand the fieldm_commentisNULLfory- which means, that there is a newer version thanxwithNULLatm_comment.xwithin your BEXIS2 system.Primary Data.Within the source code, there is a count on data changes from between version
xand newer version to decide from where the primary data should be loaded. But there are some entries that haveNULL, so the check will break.Core/Console/BExIS.Web.Shell/Areas/DDM/Controllers/DataController.cs
Line 585 in 4b10d73
Do you get any exceptions?
Yes, please check out the screen.