Support » Plugin: Import Members from CSV for Paid Memberships Pro » Possible to Increase # of Records Allowed Per Iteration?

  • Hi Thomas,

    I was noticing that with the import plugin, I can’t import more than 16 records per iteration.

    I have a CSV with 2000 records on it, and before I break it up into many many smaller spreadsheets, I wanted to ask you if it was at all possible to increase the allowed number of records per iteration in the import process.

    Thank you for your thoughts. I promise I’ll stop bugging you once my import is complete! 🙂

    PS I already imported 250 of my top customers using your plugin. Thank you so much.

    Liat

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Thomas S

    (@eighty20results)

    Hi,

    The plugin tries to calculate the # of records per loop based on the max_execution_time PHP value setting on the server. It’s using a JavaScript top to run through all of the records in the .csv, unless some error (either in the import file, in PHP, or with JavaScript in your browser) is triggered, as long as the “background” option is enabled (it’s checked by default, so it should take positive action on your end to deactivate the background import)

    I’ve used the plugin to import >5000 records in a single import operation, so it’s weird that your environment only lets you import 16 at a time…

    What happens after the 16 records are imported?

    Hi Thomas,

    Thank you so much for your help.
    First, here’s what GoDaddy found as far as the import limit – this is what they did and wrote to me before I wrote to you:

    “When we checked debug.log for your site (knitfreedom.com) – we saw the following notification:

    [19-Apr-2018 08:22:45 UTC] PHP Strict Standards: Non-static method IS_IU_Import_Users::init() should not be called statically in /home/content/a2pewpnaspod05_data06/08/41540008/html/wp-content/plugins/import-users-from-csv/import-users-from-csv.php on line 374

    [19-Apr-2018 08:22:45 UTC] Will allow up to 16 records per iteration, using up to 1.5 seconds per record…

    The first line is a warning because that plugin is using out-dated code (but it still can work even with out-dated code) and the second line shows that plugin will allow only 16 records per iteration.

    So, it seems that plugin itself will not allow you to upload more than 16 records. We added standard .user.ini file to increase possible hosting limitations, that will maybe help, even though – it looks like import users plugin is limited to 16 records – you should reach out to the plugin developers (https://wordpress.org/plugins/import-users-from-csv/#description) to see can they do something about it.

    The plugin “Import Users from CSV” is out-dated for over 5 years but Membership plugin needs it in order to work, you can see the message on this page: https://www.paidmembershipspro.com/add-ons/pmpro-import-users-csvhttp://prntscr.com/j799gw.

    Developer notes:

    – added standard .user.ini file to increase possible hosting limitations, the content of the .user.ini file:

    memory_limit = 256M

    max_execution_time = 300

    max_input_time = 300

    post_max_size = 64M

    max_input_vars = 8000

    file_uploads = 1

    max_file_uploads = 20

    upload_max_filesize = 128M”
    ——————————–

    So they told me to reach out to you.

    To answer your question, I tried to get to the error log but I get a Page Not Found (https://knitfreedom.com/wp-content/uploads/pmp_im_errors.log).

    So I am getting some errors right now but am not sure what they are because I can’t see the log.

    I’m also getting an error that I’m “Missing ID, user_login or user_email information column” even though I’m using the same simple upload file layout as before.

    I’m going to ask GoDaddy to work on this some more, but I just wanted to give you my answers to your questions and pass on whatever they said about the import limits.

    Thank you,
    Liat

    Plugin Author Thomas S

    (@eighty20results)

    Hi again!

    So.. (I hate doing this, but…) The GoDaddy support tech has no clue what they’re talking about here (they’re troubleshooting the wrong plugin, for starters…)

    The first line is a warning because that plugin is using out-dated code (but it still can work even with out-dated code)

    and here:

    So, it seems that plugin itself will not allow you to upload more than 16 records

    The PHP Warning message is from a _different_ plugin than the Import Members from CSV plugin (my plugin)…

    (It’s an old plugin you actually do not need to have active if you’re using the Import Members from CSV plugin: “Import Users from CSV”)

    Secondly, the _key_ to the 2nd message is the word “iteration”…

    The import operation, if the “background import” option is enabled on the import page, runs as a JavaScript (AJAX) loop in your browser.

    True, each time the plugin goes through an iteration, it (appears to) only import 16 records.

    However, once the 16 records are imported _and_ have done so successfully (no errors, at most warnings), the AJAX loop waits for a couple of seconds and then triggers another 16 record import.

    This continues until all of the records are imported (as long as the JavaScript stack is functional in your browser – no JS errors, no fatal PHP errors happen _and_ the browser window is open on the import page).

    The number of records per iteration are calculated based on the return value the plugin receives when querying the system’s max_execution_time PHP setting. For some reason PHP, when my plugin is executing on this system, doesn’t appear to be returning the value GoDaddy support claims it should be returning (300 – aka 5 minutes).

    If it had, the # of records per iteration should be 60, or thereabouts.

    I’m also getting an error that I’m “Missing ID, user_login or user_email information column” even though I’m using the same simple upload file layout as before.

    _This_ may explain the situation if/when the plugin only runs through a single iteration…

    For some reason, the plugin thinks there are records without the correct/recognizable user ID value (must be the actual record ID in the wp_users table for that user), the user_login (username), _or_ a valid email address (in the user_email column..

    Is it possible that somewhere in the first 16 records, there’s a problem with the data for either of those (including duplicate email addresses)?

    Hiya!
    To address just one, possibly key detail – if there are duplicate email addresses in the spreadsheet, something will go wrong? Are duplicate email addresses not allowed in the same spreadsheet?

    I definitely have duplicate email addresses in my spreadsheet.

    I would have to address this before anything else.

    Thanks,
    Liat

    Plugin Author Thomas S

    (@eighty20results)

    Hey,

    if there are duplicate email addresses in the spreadsheet, something will go wrong?

    WordPress doesn’t like two different usernames (user records) having the same email address.

    Plugin Author Thomas S

    (@eighty20results)

    Hi,

    Since it’s been a little while since our last exchange on this topic, I’m going to mark this thread resolved.

    If you still have the problem you reported, and simply haven’t been able to respond, please forgive me for closing your topic. We’ll be happy to continue helping you! Just open a new topic in the forum, and refer to this one by including a link to it in your new topic.

    If your issue has been resolved, and you happen to have 2 minutes available, it would be great if you could add an honest review of this plugin in the wordpress.org plugin repository: https://wordpress.org/support/view/plugin-reviews/pmpro-import-members-from-csv/.

    Plugin Author Thomas S

    (@eighty20results)

    Closing

    Hi Thomas,
    You are the best. Yes, I finally solved all my issues. I learned that:

    1) There must be no duplicates in the spreadsheet.
    2) Sending a “new user” notification makes the upload crash after a 40-50 records – other ways of notifying members are better.

    Thank you,
    Liat

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Possible to Increase # of Records Allowed Per Iteration?’ is closed to new replies.