NOTE:: Before reporting an issue, make sure you are running the latest version, currently 3.3.1
|Anonymous | Login | Signup for a new account||23-04-17 11:05 BST|
|My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0006275||phplist application||All Other||public||30-04-06 20:34||04-06-13 16:46|
|Target Version||Fixed in Version||2.11.11|
|Summary||0006275: False warnings during test import with 'import emails with different values for attributes'|
|Description||This 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
|Tags||No tags attached.|
|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.|
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:
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.
|Yes I can confirm that this seems to be true, there is noextra fields, lines in my import file.|
|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?|
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?
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"]))
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)) .
|applied 0006275:0051173 and that seems to resolve it. Thanks!|
|Copyright © 2000 - 2017 MantisBT Team|