Skip to content
This repository was archived by the owner on Apr 3, 2024. It is now read-only.
This repository was archived by the owner on Apr 3, 2024. It is now read-only.

"Export to CSV" breaks if a form is submitted after the hosted page node is unpublished (Umbraco v7.15) #163

@TFAstudio

Description

@TFAstudio

If you load a web page with a form and that node is then unpublished whilst you still have it open, the form can still be submitted. The experience for the user is adequate as they see the thank-you message and the record is passed to the data handlers without an issue.

However, we have discovered the record is saved to the database with two NULL references:

  • URL
  • PageID

When we try to export via the back office using the Formulate > Submissions > Export to CSV feature, it fails.

"System.NullRefereceException"
<StackTrace>
at CsvHelper.CsvWriter.WriteField[T](T field) at formulate.app.Controllers.StoredDataDownloadController.GenerateCsvOfFormSubmissions(Form form) at formulate.app.Controllers.StoredDataDownloadController.DownloadCsvExport(GetCsvExportRequest request) at lambda_method(Closure , Object , Object[] ) at System.Web.Http.Controllers.ReflectedHttpActionDescripto....

The NULL references in the JSON data are the cause.

Valid record:

97986    123DBBD2-BCFA-410E-AFFE-20D6BC216aaa         2019-11-25 01:04:41.447               CFC1A6B7-B65C-4499-8CDF-E77BA550Eccc   [
  {
    "FieldId": "c81939123bae452b9e75de0530cc1bbb",
    "FieldName": "Referral",
    "Value": "Official Website"
  }
]              []             /applications/          1335

Breaking record:

97987    3DD3A390-3E22-428D-B223-D2FFBAF5Dyyy         2019-11-25 01:04:29.370               CFC1A6B7-B65C-4499-8CDF-E77BA550Eccc   [
  {
    "FieldId": "c81939123bae452b9e75de0530cc1bbb",
    "FieldName": "Referral",
    "Value": "Friend is staff"
  }
]              []             NULL     NULL

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions