Relationship Graph View Issue Dependency Graph
related to child of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
0003603phpList 3 applicationSubscriber Importpublic15-07-05 01:17
Reporterjotazzu 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionduplicate 
Product Version2.9.4 
Target VersionFixed in Version 
Summary0003603: False warnings during test import with 'import emails with different values for attributes'
DescriptionWhen 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($values)-1). "!=".
        (sizeof($_SESSION["import_attribute"]) + sizeof($_SESSION["system_attributes"]))
      ."), this may cause trouble: $index");
TagsNo tags attached.

Activities

michiel

15-07-05 01:17

manager   ~0005666

When the next version comes out (soon I hope) and you find this error is still there please re-submit bugreport.