Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import from Excel errors are not displayed any more #35

Open
nbarnwell opened this issue Nov 7, 2011 · 2 comments
Open

Import from Excel errors are not displayed any more #35

nbarnwell opened this issue Nov 7, 2011 · 2 comments
Assignees
Labels

Comments

@nbarnwell
Copy link
Member

Reproduction steps

  1. Visit the Excel Importer, by going to /ExcelImport.
  2. Do not select a file for upload.
  3. Click the Upload button

Expected

  1. An error message is displayed indicating that you did not select a file for upload.

Actual

  1. The Import page is re-displayed with no error message.
@ghost ghost assigned alastairs Nov 7, 2011
@alastairs
Copy link
Member

After spending a few hours looking into this and trying to fix it up as-is, I've come to the conclusion that fixing this will require something of a re-write of the feature. The feature was converted to an AsyncController during GiveCamp, which turned out to be wrong in two ways:

  1. AsyncControllers shouldn't be used to improve the user experience, which was my reasoning for doing it: I wanted to give the user quick feedback that their file was being imported. A file of ~1000 records takes a few seconds to import. Reading around the topic has indicated that AsyncControllers are a scalability feature only.
  2. The conversion to an AsyncController was completed incorrectly during GiveCamp, and so it wasn't actually being called asynchronously as expected! This was rectified when the functionality was moved into GiveCRM itself, which is when the error messages stopped working.

The correct solution to improve the user experience appears to be to upload the spreadsheet via AJAX. This looks like a good jQuery plugin to use.

@alastairs
Copy link
Member

@nbarnwell made these comments on Twitter:

I don't think I'd burden IIS with long running tasks. Better to have it save the data somewhere for something else to pick up, although how we'd do that given we don't really know our hosting strategy yet is beyond me. Serialise raw data to DB I guess, in some sort of staging table that a totally separate process can then import properly. Row can also contain status of import too, so a standard non- async controller can just query for status. Ideally though each line in the file would be an msg for an ESB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants