Relationship Graph

Relationship Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
0006275phpList 3 applicationGeneralpublic04-06-13 16:46
Reporterdhutton Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.10.2 
Fixed in Version2.11.11 
Summary0006275: False warnings during test import with 'import emails with different values for attributes'
DescriptionThis is the problem reported in 0003603, which still occurs in latest version.

When using the function 'import emails with different values for attributes' the warning message is always displayed (if the 'show warnings' box is checked:

"Warning: Record has more values than header indicated (30!=28), this may cause trouble"

PHP version: 4.4.2
TagsNo tags attached.

Relationships

related to 0015231 resolvedmichiel False warnings during test import with 'import emails with different values for attributes' 

Activities

michiel

02-05-06 14:43

administrator   ~0013261

well, are you so sure that the warning is false? Does the record have more columns than the header? It may well be that the warning is very helpful to find errors in your input file.

dhutton

02-05-06 16:34

reporter   ~0013267

Yes, I am sure.
I have tested this function again with a variety of test import files.
Here are the results:
1) the warning message ALWAYS occurs for me, using 'import emails with different values for attributes' and with the 'test output' and 'show warnings' options selected (this is my normal way of performing imports)

2) the warning message shows correctly the number of values, but under-estimates the number of fields in the header, even with a simple two-column tab-delimited import file like this:

Password email
tester test@domain.com

3) the under-estimate in the number of fields in the header seems to result from the 'email' field not being counted

4) in addition EVERY header field that contains the string 'email' is not counted, for example fields with names like 'ReminderEmail'. That's why the error message I provided in my first bug report indicated a discrepancy of two.

I hope that this information helps.

alans

19-03-08 10:20

reporter   ~0043129

Yes I can confirm that this seems to be true, there is noextra fields, lines in my import file.

user1308

01-04-08 19:18

  ~0043958

Alams, what version are you using. I cannot replicate this on 2.11.3, can you give me a part of the file your tried to test it?

kyrian

01-10-09 19:00

reporter   ~0050744

I just experienced this, only it was 11!=5, and I figured I had about 11 attributes assigned in the relevant admin page of the system.

So I expected the problem to go away when I removed any extraneous attributes from phplist.

This did not seem to be the case, but it may still be noteworthy that the numbers remained as 11 & 5, so perhaps phplist is counting inactive/deleted attributes when counting to see if the sheet contain the right number of columns?

wolfgang_g

23-03-11 01:31

reporter   ~0051173

I encountered the same problem with importing csv-tables in Version 2.10.12.

"Warning: Record has more values than header indicated (19!=26), this may cause..."

This false warning is caused by a false calculation in admin/commonlib/pages/importcsv.php

Line 530 V2.10.12.

if (sizeof($values) != (sizeof($_SESSION["import_attribute"]) + sizeof($system_attributes)) && !empty($_SESSION['test_import']) && !empty($_SESSION["show_warnings"]))

has to be changed to:

if (sizeof($values) != (sizeof($_SESSION["import_attribute"]) + sizeof($system_attributes) - sizeof($unused_systemattr)) && !empty($_SESSION['test_import']) && !empty($_SESSION["show_warnings"]))

Line 532

sizeof($values) . "!=" . (sizeof($_SESSION["import_attribute"]) + sizeof($system_attributes)) .

has to be changed to:

sizeof($values) . "!=" . (sizeof($_SESSION["import_attribute"]) + sizeof($system_attributes) - sizeof($unused_systemattr)) .

michiel

04-06-13 16:45

administrator   ~0052088

applied 0006275:0051173 and that seems to resolve it. Thanks!