When i discovered feeds_excel, I believed my task to import data was finished...
But i found a bug...
After configuring the feed_excel, i tried to import a simple file and the progress bar was stuck to 0%.
After long hours of debugging, i finally found the issue :
In the ExcelParser.inc, in the function parseItems, there is a if statement to check an offset :
original code :
<?php
// Start off after the last element for known sheets.
if ($sheet_id == $last_sheet_id) {
$offset = $last_sheet_item + 1;
}
// Start off at 0 for new sheets.
else {
$offset = 0;
}
?>
In fact, if i(ts the first run, the pointer is : ":" so $last_sheet_id id empty.
On the other side, $sheet_id is equals to 0.
"" == 0 means
false == false
so it returns true.
We have to check like this :
<?php
// Start off after the last element for known sheets.
if ($sheet_id === $last_sheet_id) {
$offset = $last_sheet_item + 1;
}
// Start off at 0 for new sheets.
else {
$offset = 0;
}
?>
Sorry for my report, it's my first. (also i'm french, damn...)
And i don't know yet how to work with GIT and making patches. (sorry)
Comments
Comment #1
secrestat commentedThank you instead for your report, it was so useful
Comment #2
derhasi commentedDid you check if your problem is gone in the current 7.x-1.x-dev? The part you mentioned was replaced since beta1.
Comment #3
mrromios commented