Support

Home Forums Event Espresso Premium eea-importer not extracting csv rows results in 0 rows imported

eea-importer not extracting csv rows results in 0 rows imported

Posted: September 9, 2022 at 1:50 pm


dirk.tussing

September 9, 2022 at 1:50 pm

HI support,

When using the registration importer recently, we notice csv file not able to import. The sample row 1 and row2 not showing any data, therefore upon processing, not registrations were being imported.

I was able to make it work by comment out a few lines in the getItemAt() function:

...
/**
* Gets an array of the raw data from the source (eg a row from the CSV, a JSON object,
* @since 1.0.0.p
* @return array
*/
public function getItemAt($offset)
{
// if ($offset >= $this->countItems()) {
// return null;
// }
$this->fileObject->seek($offset);
return $this->fileObject->current();
}
...
// End of file ImportExtractorCsv.php
// Location: EventEspresso\AttendeeImporter\application\services\import\extractors/ImportExtractorCsv.php


It seems like countItems() function is not working correctly and the size is always null.

is there fix?

Thanks.


Tony

  • Support Staff

September 14, 2022 at 4:22 am

Hi there,

This is strange and I’m not able to reproduce this.

I’m wondering if $offset is being set incorrect, or if countItems() is indeed failing here.

Can you dump the values of both and let me know what is returned?

if ($offset >= $this->countItems()) {
    var_dump($offset);
    var_dump($this->countItems());
}

The support post ‘eea-importer not extracting csv rows results in 0 rows imported’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso