|Dependency Graph||View Issue Relation Graph Horizontal|
View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003603||phpList 3 application||Subscriber Import||public||15-07-05 01:03||15-07-05 01:17|
|Target Version||Fixed in Version|
|Summary||0003603: False warnings during test import with 'import emails with different values for attributes'|
|Description||When importing with the topic 'import emails with different values for attributes' in test mode and warnings on an import without new added fields results in a warning for every imported record "Record has more values than header indicated", although every thing is ok. This is a false warning resulting from a size mismatch in the comparison statement. |
The imported email list contains the field 'Email', which is not listed in the assignment list of the resulting import page. As I remember the Email field is also not part of the attributes table in the mySQL database. This is probably the reason for the size mismatch.
The problem can be solved by changing the comparison statement in .../admin/commonlib/pages/importcsv.php at about line 312:
# The original comparison ignores that sizeof($values) also contains the field 'Email' which
# is not contained in 'import_attribute' and 'system_attributes'.
# Subtracting 1 from sizeof($values) solves the problem.
if ((sizeof($values)-1) != (sizeof($_SESSION["import_attribute"]) + sizeof($_SESSION["system_attributes"]))
&& $test_import && $_POST["show_warnings"])
Warn("Record has more values than header indicated (".
(sizeof($_SESSION["import_attribute"]) + sizeof($_SESSION["system_attributes"]))
."), this may cause trouble: $index");
|Tags||No tags attached.|