Home › Forums › Plugin Support › Import Fails, Only one user imported
Tagged: Import fails
- This topic has 11 replies, 5 voices, and was last updated 11 years, 9 months ago by thendara.
-
AuthorPosts
-
February 24, 2013 at 11:05 pm #3165February 25, 2013 at 2:40 pm #3168SupportMember
Hello,
Please try following fixes with version 1.1.3rc2
Open user-meta/controllers/pro/umExportImportController.php then add following line at line 98 and 127 (for version 1.1.3rc2)
ini_set('auto_detect_line_endings', true);
February 25, 2013 at 6:44 pm #3169thendaraMemberStill only added one user, this is the code I modified
function importForm( $key ){
global $userMeta, $wp_roles;
ini_set(‘auto_detect_line_endings’, true);
$uploads = wp_upload_dir();
$fullpath = $uploads[ ‘basedir’ ] . @$_REQUEST[ ‘filepath’ ];$file = fopen( $fullpath, “r” );
$csvHeader = fgetcsv( $file );
$csvSample = fgetcsv( $file );
fclose( $file );$fieldList = $userMeta->defaultUserFieldsArray();
$fieldAdded = array( ” => ”, ‘custom_field’ => ‘Custom Field’);
$fieldList = array_merge( $fieldAdded, $fieldList );$roles = $wp_roles->role_names;
$roles = array_merge( array(”=>”), $roles );$userMeta->renderPro( “importStep2”, array(
‘key’ => $key,
‘fullpath’ => $fullpath,
‘csvHeader’ => $csvHeader,
‘csvSample’ => $csvSample,
‘fieldList’ => $fieldList,
‘roles’ => $roles,
), ‘exportImport’);
}function userImport(){
global $userMeta;
ini_set(‘auto_detect_line_endings’, true);
$csv_header = @$_POST[ ‘csv_header’ ];
$selected_field = @$_POST[ ‘selected_field’ ];
$custom_field = @$_POST[ ‘custom_field’ ];February 28, 2013 at 4:10 pm #3182SupportMemberHello, can you please send a sample copy of your csv file to check the formation.
February 28, 2013 at 8:34 pm #3186thendaraMemberHi, where do I send it? webmaster@thendaramountainclub.org
February 28, 2013 at 9:52 pm #3187SupportMemberTo support(at)user-meta.com
March 3, 2013 at 6:24 am #3193catrancherMemberI’m having the same issue. Only imports a single user from my CSV file. It does however import the column headings and establishes them as the appropriate fields. I applied the following fix as mentioned in an earlier post:
ini_set(‘auto_detect_line_endings’, true);
This was applied at lines 98 and 127 in user-meta/controllers/pro/umExportImportController.php.
I’m at User Meta version 1.1.3rc2 running on a Mac. I’ve tried setting the line endings of the CSV file to both Windows line endings (CRLF) as well as Unix/Mac line endings (LF). Still only imports the headings/field names and the first user.Ideas? Suggestions?
Thanks,
TomMarch 3, 2013 at 6:36 am #3194thendaraMemberMake sure you dont have plugin new-user-approve. I think thats what caused the problem. Try disabling any other user plugins you may have.
March 3, 2013 at 8:22 pm #3199catrancherMemberPerfect! Fixed. Makes perfect sense too! I should have thought of that. But I didn’t. Thanks for your input. Problem solved.
Tom
March 5, 2013 at 3:12 am #3214azuremarcomMemberI will try this as well. For me, changing the line ending character from (CR) to (CRLF) seemed to work for me. I too am using version 1.1.3.rc2.
March 20, 2013 at 7:39 am #3496anthonybartoliMemberI am having the same problem.
I have ini_set(‘auto_detect_line_endings’, true); at the correct locations and I have no other user-related plugins.
Line endings are CRLF.
- This reply was modified 11 years, 9 months ago by anthonybartoli.
- This reply was modified 11 years, 9 months ago by anthonybartoli.
March 20, 2013 at 8:14 am #3500thendaraMemberThere is a plugin New User Approve, when I had that installed along with Meta Pro, Meta Pro did not work correctly. I would suggest disabling any user plugins you have other than Meta Pro. It pretty much does it all anyway.
-
AuthorPosts
- You must be logged in to reply to this topic.