Posted by kenorb on July 21, 2009 at 3:08pm
Jump to:
| Project: | User Import |
| Version: | 6.x-2.3 |
| Component: | Code |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I've found it in logs during user import.
URL: admin/user/user_import/import/2
Comments
#1
<?phpfunction _user_import_update_user_check($settings) {
foreach ($settings as $setting) {
?>
when this function is executed?
#2
Same error here, when importing a pretty large file though (80,000 users) - not sure if the size has any impact...
#3
Can you please test on User Import 6.2.1 and re-open this issue if it still exists.
#4
Same problem here but on line 1336 ? I don't know if it's the same problem.
For me, this error appears when I try to import a CSV with duplicate email in it. Btw, I can see it in error log: "duplicate email". I think User Import check your CSV to see if an email isn't already in database, but it's not checking if you have a mail twice in your CSV.
#5
Is this still an issue in User Import 6.2.2?
#6
I use 6.2.2.
#7
#8
#9
I'm using 6.x-2.2 and still getting this error.
Any ideas for a temporary fix?
#10
I had 10 errors of this kind while importing 2721 users in chunks of 250 - that is, 1 error per "continue processing" page, except for the first processed page. Other than this message, import was successful - i.e. with no duplicate emails or something like that.
#11
After setting "users per process" to 3000, and performing users import in one run - there were no "invalid argument" messages at all.
I believe this could be a temporary workaround :) - that is, setting "users per process" to a value higher than the number of users. Just don't forget to tweak PHP's max_execution_time, if you are importing lots of users.
#12
I set my max value to 1000 for an import of only 300 and I still get the error message. It only imported about 80 of the users. Any help would be greatly appreciated.
FYI - I looked for a max_execution_time in phpMyAdmin and found nothing.
#13
max_execution_time is a PHP configuration parameter, usually found in the php.ini file. By default, it is set to 30 seconds - any script running longer than that will be terminated. I believe time is measured by CPU time, so under heavy load observed wall-clock time will be over 30 seconds.
Import of 3k users took somewhere between 60 and 180 seconds on my 3GHz system (do not quite remember).
#14
I should have guessed that it would be in the php.ini file, but thought there was a change it was simply a setting that could be accessed through the administration panel. Thanks for the tip.
Using your example, if 3k took between 60-180 seconds, would you say that 300 shouldn't take more than 30 seconds? I'm just trying to troubleshoot to see why it only imported less than a third of the total, and it's not like I'm importing that much even.
#15
To be absolutely sure that this is not time limit-related, just set max execution time to something like 3600 seconds.
I believe you could also do that with a call to set_time_limit(0) from the very top of Drupal's index.php
I wouldn't dare estimating anything from my own single import run :)
#16
For anyone else who stumbles across this fun little bug... The problem is that after the first batch of users are imported, the import options get overwritten. This is especially bad if you are sending a welcome email to all your users. The first import will get the email you specified in the import options. Any continued imports will get the default drupal welcome messsage.
Note that this solution breaks the ability to save import options after the import is created! Because of the really funky way in which the import settings are saved I did not have time find a solution that would fix the bug and also preserve the ability to update the import options.
Find this function : "function _user_import_settings_save($settings)" on line 1185. Then find the section of code that looks like this
$settings['options']['groups'] = $settings['groups'];
$settings['options']['existing_og_subscribe'] = $settings['existing_og_subscribe'];
$settings['options']['existing_og_subject'] = $settings['existing_og_subject'];
$settings['options']['existing_og_markup'] = $settings['existing_og_markup'];
$settings['options']['existing_og_message'] = $settings['existing_og_message'];
$settings['options']['existing_og_css'] = $settings['existing_og_css'];
$settings['options']['subject'] = $settings['subject'];
$settings['options']['message'] = $settings['message'];
$settings['options']['message_format'] = $settings['message_format'];
$settings['options']['message_css'] = $settings['message_css'];
$settings['options']['activate'] = $settings['activate'];
$settings['options']['subscribed'] = $settings['subscribed'];
$settings['options']['update_user'] = $settings['update_user'];
$settings['options']['roles_new'] = $settings['roles_new'];
And replace it with this
if(count($settings['options']) < 2){
$settings['options']['groups'] = $settings['groups'];
$settings['options']['existing_og_subscribe'] = $settings['existing_og_subscribe'];
$settings['options']['existing_og_subject'] = $settings['existing_og_subject'];
$settings['options']['existing_og_markup'] = $settings['existing_og_markup'];
$settings['options']['existing_og_message'] = $settings['existing_og_message'];
$settings['options']['existing_og_css'] = $settings['existing_og_css'];
$settings['options']['subject'] = $settings['subject'];
$settings['options']['message'] = $settings['message'];
$settings['options']['message_format'] = $settings['message_format'];
$settings['options']['message_css'] = $settings['message_css'];
$settings['options']['activate'] = $settings['activate'];
$settings['options']['subscribed'] = $settings['subscribed'];
$settings['options']['update_user'] = $settings['update_user'];
$settings['options']['roles_new'] = $settings['roles_new'];
}
AND WHILE YOU'RE AT IT....
Add a call to set_time_limit in the main import function. Could save a lot of headaches.
function _user_import_process($settings) {set_time_limit(0);
#17
is this fixed with 6.x-2.4?
#18
still doing this in 6.x-2.4