Skip to content

Show Primary Data return HTTP-error 500 #1606

Description

@sventhiel

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:

  1. A version x of that dataset contains primary data.
  2. 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.
  3. Select version x within your BEXIS2 system.
  4. Go to Primary Data.
  5. 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.

image

Metadata

Metadata

Labels

No labels
No labels

Type

Fields

No fields configured for Bug.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions