Bit of a strange one. I've extracted data from a table using a separate custom code section and put it in the form data using:
$form->data['myData'] = $db->loadObjectList();
Then in the CSV Export V2 [GH] I've used myData for the Data Path. All other fields are empty/default. It produces a zero byte file to download (it isn't reaching the onFail because I've a failure message and a showStopper in there).
I get this debug info:
4 records were found to export.
Save link is:
http://....csv_export__201406070029.csv
File size is: 0 kb
Looking in the server, it does indeed create a zero byte file with the correct name. I can't see why my file is empty. The debug shows all 4 records complete with all the required data. Add Titles is ticked, so it should at least add the titles into the csv file.
To be certain, I removed my CSV Export V2 [GH] and dragged in a new one. All I filled in was the data path. File still zero bytes.
Have I found a bug, or have I done something silly?
Thanks
Brian
$form->data['myData'] = $db->loadObjectList();
Then in the CSV Export V2 [GH] I've used myData for the Data Path. All other fields are empty/default. It produces a zero byte file to download (it isn't reaching the onFail because I've a failure message and a showStopper in there).
I get this debug info:
4 records were found to export.
Save link is:
http://....csv_export__201406070029.csv
File size is: 0 kb
Looking in the server, it does indeed create a zero byte file with the correct name. I can't see why my file is empty. The debug shows all 4 records complete with all the required data. Add Titles is ticked, so it should at least add the titles into the csv file.
To be certain, I removed my CSV Export V2 [GH] and dragged in a new one. All I filled in was the data path. File still zero bytes.
Have I found a bug, or have I done something silly?
Thanks
Brian
Hi Brian,
I'm not at my desk right now but my memory is that the action expects an array of arrays, not an array of objects. Does $db->loadAssocList() - or something similar - work better?
Bob
I'm not at my desk right now but my memory is that the action expects an array of arrays, not an array of objects. Does $db->loadAssocList() - or something similar - work better?
Bob
This topic is locked and no more replies can be posted.