[TH] User Import and Export [Deleted]

hi when running an export i get the following error

errors>
<error>
DOMElement::setAttribute() expects parameter 2 to be string, array given
</error>
<trace>
<entry function="XenForo_Application::handlePhpError" file="" line=""/>
<entry function="DOMElement->setAttribute" file="/home/SITENAME/public_html/forum/library/Waindigo/UserImpEx/Extend/XenForo/Model/User.php" line="83"/>
<entry function="Waindigo_UserImpEx_Extend_XenForo_Model_User->getUsersXml" file="/home/SITENAME/public_html/forum/library/Waindigo/UserImpEx/Extend/XenForo/ControllerAdmin/User.php" line="33"/>
<entry function="Waindigo_UserImpEx_Extend_XenForo_ControllerAdmin_User->actionExport" file="/home/SITENAME/public_html/forum/library/XenForo/FrontController.php" line="347"/>
<entry function="XenForo_FrontController->dispatch" file="/home/SITENAME/public_html/forum/library/XenForo/FrontController.php" line="134"/>
<entry function="XenForo_FrontController->run" file="/home/SITENAME/public_html/forum/admin.php" line="13"/>
</trace>
</errors>

can anyone help please
 
Yep I am getting the same thing.

Interestingly, I don't see the error when I export some users but I do when I try to export users created after I added a custom field after I installed the add-on. (I added the im/ex addon..then added a new custom field). Curiously, its just the presecne of this field that triggers it..I have another new user where I did not check the box when I created him.

I'm going to tease this one apart a bit more but I suspect that there is something going on with that custom field. Perhaps because some of the users don't have it? Or maybe that some do and some don't? Anyway, I think I am on to figuring out a work around and if I do I will post. But my error is the same as yours. This is the error I get when I try to export a user who used the field. I have deleted that field (it was a single checkbox) but I suspect that the data has not been cleanly deleted or there is some setting that is set when you install it such that the addon expects the custom data to look a certain way..since I changed that after I installed it I may have broken that.

I'm going to uninstall the addon, and reinstall it and see if that fixes this.

<errors>
<error>
DOMElement::setAttribute() expects parameter 2 to be string, array given
</error>
<trace>
<entry function="XenForo_Application::handlePhpError" file="" line=""/>
<entry function="DOMElement->setAttribute" file="/home/savvyauthors/public_html/Community/library/Waindigo/UserImpEx/Extend/XenForo/Model/User.php" line="83"/>
<entry function="Waindigo_UserImpEx_Extend_XenForo_Model_User->getUsersXml"file="/home/savvyauthors/public_html/Community/library/Waindigo/UserImpEx/Extend/XenForo/ControllerAdmin/User.php" line="33"/>
<entry function="Waindigo_UserImpEx_Extend_XenForo_ControllerAdmin_User->actionExport"file="/home/savvyauthors/public_html/Community/library/XenForo/FrontController.php" line="347"/>
<entry function="XenForo_FrontController->dispatch" file="/home/savvyauthors/public_html/Community/library/XenForo/FrontController.php" line="134"/>
<entry function="XenForo_FrontController->run" file="/home/savvyauthors/public_html/Community/admin.php" line="13"/>
</trace>
</errors>
 
Oh also, I cannot get this export as a CSV file only as an XML. Is there a setting I am missing? I'm assuming I can import from a CSV though since it appears that works for others. I dont want to try to import until I can get all the users exported so I am certain that I have all the fields properly named.

Oh..and when I do export the users who have not used the new custom field, that field is not listed in the export XML. I also tried rebuilding the addon but that didn't work either.

Thanks
 
Last edited:
I've removed the field that I believe is causing the error, removed the import/export users add-on and reinstalled it, rebuilt the user cache and that worked! So apparently there is something bad that happens when you do the followiong:

1) have Custom User Fields (by Waindigo) installed.
2) then install user import/export
3) add a new custom Field and have at least one user enter infomration in it.
--those users cannot be exported now..but any user who has not entered information in that field can be exported.

--to fix this you must...(and this may be overkill as I was not all the rigorous with my method)
1) remove the Custom Field that was causing the issue
2) uninstall (rebuilding does not work..you have to unistall) import/export
3) reinstall import/export
4) rebuild the user caches.

Leslie
 
I was having the same issue, although I had not added any custom fields after installing the add-on. I did the following which fixed it for me.

  1. Uninstall add-on
  2. rebuild user caches
  3. install the add-on
  4. rebuild user caches
And that got it working. Hope that helps someone out.
 
Can you import Custom Fields?

I.E.

<custom_field field_id="ServerID" field_value=""/> <<<< Export

Would "ServerID" be the Import header?
 
Could you kindly put up a full list of importable fields and their header names, please?

Many thanks for the swift response :)
 
Could you kindly put up a full list of importable fields and their header names, please?

Many thanks for the swift response :)
The column names are exactly the same as the database tables. Look for tables that begin with xf_user. This also supports any add-ons that extend these tables, so to provide a full list is basically impossible.
 
Thanks Jon, sent you a PM too.

Also, is it possible to set a user to a certain usergroup? The export doesn't contain the field, so I'm guessing not?
 
Server Error
Argument 1 passed to XenForo_Helper_UserChangeLog::_prepareField() must be of the type array, string given

  1. XenForo_Application::handlePhpError() in XenForo/Helper/UserChangeLog.php at line 173
  2. XenForo_Helper_UserChangeLog->_prepareField()
  3. call_user_func() in XenForo/Helper/UserChangeLog.php at line 183
  4. XenForo_Helper_UserChangeLog->_prepareField() in XenForo/Helper/UserChangeLog.php at line 79
  5. XenForo_Helper_UserChangeLog->prepareField() in XenForo/Model/UserChangeLog.php at line 232
  6. XenForo_Model_UserChangeLog->prepareField() in Waindigo/UserImpEx/Extend/XenForo/ControllerAdmin/User.php at line 127
  7. Waindigo_UserImpEx_Extend_XenForo_ControllerAdmin_User->actionImportForm() in XenForo/FrontController.php at line 347
  8. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  9. XenForo_FrontController->run() in /var/www/xenforo/admin.php at line 13



    I get the above error when attempting to import a user
    Spreadsheet:
    http://gyazo.com/fbda1f3234056b4824baf3bb6ced03e3

Server Error Logged too:

Error Info
ErrorException: Argument 1 passed to XenForo_Helper_UserChangeLog::_prepareField() must be of the type array, string given - library/XenForo/Helper/UserChangeLog.php:173
Generated By: Dan Hawkins, A moment ago
Stack Trace
#0 /var/www/xenforo/library/XenForo/Helper/UserChangeLog.php(173): XenForo_Application::handlePhpError(4096, 'Argument 1 pass...', '/var/www/xenfor...', 173, Array)
#1 [internal function]: XenForo_Helper_UserChangeLog->_prepareField('')
#2 /var/www/xenforo/library/XenForo/Helper/UserChangeLog.php(183): call_user_func(Array, '')
#3 /var/www/xenforo/library/XenForo/Helper/UserChangeLog.php(79): XenForo_Helper_UserChangeLog->_prepareField(Array)
#4 /var/www/xenforo/library/XenForo/Model/UserChangeLog.php(232): XenForo_Helper_UserChangeLog->prepareField(Array)
#5 /var/www/xenforo/library/Waindigo/UserImpEx/Extend/XenForo/ControllerAdmin/User.php(127): XenForo_Model_UserChangeLog->prepareField(Array)
#6 /var/www/xenforo/library/XenForo/FrontController.php(347): Waindigo_UserImpEx_Extend_XenForo_ControllerAdmin_User->actionImportForm()
#7 /var/www/xenforo/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#8 /var/www/xenforo/admin.php(13): XenForo_FrontController->run()
#9 {main}
Request State
array(3) {
["url"] => string(55) "http://hub.volocommerce.com/admin.php?users/import-form"
["_GET"] => array(1) {
["users/import-form"] => string(0) ""
}
["_POST"] => array(3) {
["mode"] => string(9) "uploadcsv"
["_xfConfirm"] => string(1) "1"
["_xfToken"] => string(8) "********"
}
}
 
It should work fine, the only thing that I can think of that wouldn't export/import is two factor authentication.
 
Top Bottom