This addon only works with the XenForo 1.x versions.Hey
I installed this plugin, but I do not know where it will look and does it work XenForo v2.0.11 ??
Can someone guide you?
Thank you!
@Jake B.
Got the following error, even with the unicode conversion of the DB
XF\Db\Exception: MySQL query error [1366]: Incorrect string value: '\xE9 /...' for column 'field_value' at row 1 in src\XF\Db\AbstractStatement.php at line 212
- XF\Db\AbstractStatement->getException() insrc\XF\Db\Mysqli\Statement.php at line 196
- XF\Db\Mysqli\Statement->getException() insrc\XF\Db\Mysqli\Statement.php at line 78
- XF\Db\Mysqli\Statement->execute() in src\XF\Db\AbstractAdapter.phpat line 79
- XF\Db\AbstractAdapter->query() in src\XF\Db\AbstractAdapter.php at line 207
- XF\Db\AbstractAdapter->insertBulk() insrc\XF\Behavior\CustomFieldsHolder.php at line 149
- XF\Behavior\CustomFieldsHolder->postSave() insrc\XF\Mvc\Entity\Entity.php at line 1168
- XF\Mvc\Entity\Entity->save() insrc\addons\ThemeHouse\CustomFieldImporter\Import\Importer\XenForo1.php at line 167
- ThemeHouse\CustomFieldImporter\Import\Importer\XenForo1->stepThreadFieldValues() in src\XF\Import\Runner.php at line 160
- XF\Import\Runner->runStep() in src\XF\Import\Runner.php at line 74
- XF\Import\Runner->run() in src\XF\Admin\Controller\Import.php at line232
- XF\Admin\Controller\Import->actionRun() insrc\XF\Mvc\Dispatcher.php at line 249
- XF\Mvc\Dispatcher->dispatchClass() in src\XF\Mvc\Dispatcher.php at line 89
- XF\Mvc\Dispatcher->dispatchLoop() in src\XF\Mvc\Dispatcher.php at line 41
- XF\Mvc\Dispatcher->run() in src\XF\App.php at line 1934
- XF\App->run() in src\XF.php at line 333
- XF::runApp() in admin.php at line 13
foreach ($customFields as $key=>&$value) {
$value = utf8_encode($value);
}
$th = \XF::em()->find('XF:Thread', $thread['thread_id']);
$th->custom_fields->bulkSet($customFields);
$th->save();
ErrorException: [E_WARNING] Invalid argument supplied for foreach() src/addons/ThemeHouse/CustomFieldImporter/Import/Importer/XenForo1.php:159
Stack trace
#0 src/addons/ThemeHouse/CustomFieldImporter/Import/Importer/XenForo1.php(159): XF::handlePhpError(2, '[E_WARNING] Inv...', '/opt/bitnami/ap...', 159, Array)
#1 src/XF/Import/Runner.php(231): ThemeHouse\CustomFieldImporter\Import\Importer\XenForo1->stepThreadFieldValues(Object(XF\Import\StepState), Array, 8)
#2 src/XF/Import/Runner.php(59): XF\Import\Runner->runStep('threadFieldValu...', Object(XF\Import\StepState), 8)
#3 src/XF/Admin/Controller/Import.php(234): XF\Import\Runner->run()
#4 src/XF/Mvc/Dispatcher.php(321): XF\Admin\Controller\Import->actionRun(Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(248): XF\Mvc\Dispatcher->dispatchClass('XF:Import', 'Run', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Import), NULL)
#6 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Import), NULL)
#7 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#9 src/XF.php(390): XF\App->run()
#10 admin.php(13): XF::runApp('XF\\Admin\\App')
#11 {main}
Request state
array(4) {
["url"] => string(31) "/community/admin.php?import/run"
["referrer"] => string(51) "xyz/community/admin.php?import/run"
["_GET"] => array(1) {
["import/run"] => string(0) ""
}
["_POST"] => array(1) {
["_xfToken"] => string(8) "********"
}
}
Does anyone know if the importer is working with XF 2.1?We have completed an importer for XenForo 2 that will allow you to import your custom fields into the default system within XenForo. However, there are a few quirks that need to be addressed before running it:
- The testing on this add-on has been limited to fields created by our team as well as a couple of people who use this add-on that have upgraded already, so there may be edge cases that were missed. We will try to address these if we can.
- Some data, such as required state, is not imported due to the differences in the way this works between XenForo 2 and this add-on
- If any of your custom fields use either a callback or regular expression for validation the field will be reset to have no validation, so you will need to recreate your regular expression or PHP callback once you run the importer. This is due to the differences in the way XenForo 2 handles regular expression validations.
Please do test this on a clone of your site before running the upgrade on your actual database, and as always make sure you do keep backups in case of something not going quite right.
F\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry 'age' for key 'PRIMARY' in src/XF/Db/AbstractStatement.php at line 217
XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 77
XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 94
XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 221
XF\Db\AbstractAdapter->insert() in src/XF/Import/Data/EntityEmulator.php at line 326
XF\Import\Data\EntityEmulator->insert() in src/XF/Import/Data/AbstractEmulatedData.php at line 55
XF\Import\Data\AbstractEmulatedData->write() in src/XF/Import/Data/AbstractData.php at line 127
XF\Import\Data\AbstractData->save() in src/addons/ThemeHouse/CustomFieldImporter/Import/Importer/XenForo1.php at line 126
ThemeHouse\CustomFieldImporter\Import\Importer\XenForo1->stepThreadFields() in src/XF/Import/Runner.php at line 231
XF\Import\Runner->runStep() in src/XF/Import/Runner.php at line 59
XF\Import\Runner->run() in src/XF/Admin/Controller/Import.php at line 234
XF\Admin\Controller\Import->actionRun() in src/XF/Mvc/Dispatcher.php at line 321
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 248
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 100
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 50
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2177
XF\App->run() in src/XF.php at line 390
XF::runApp() in admin.php at line 13
We have completed an importer for XenForo 2 that will allow you to import your custom fields into the default system within XenForo. However, there are a few quirks that need to be addressed before running it:
- The testing on this add-on has been limited to fields created by our team as well as a couple of people who use this add-on that have upgraded already, so there may be edge cases that were missed. We will try to address these if we can.
- Some data, such as required state, is not imported due to the differences in the way this works between XenForo 2 and this add-on
- If any of your custom fields use either a callback or regular expression for validation the field will be reset to have no validation, so you will need to recreate your regular expression or PHP callback once you run the importer. This is due to the differences in the way XenForo 2 handles regular expression validations.
Please do test this on a clone of your site before running the upgrade on your actual database, and as always make sure you do keep backups in case of something not going quite right.
Getting this error while running the import. Can someone please help with this.
Code:ErrorException: [E_WARNING] Invalid argument supplied for foreach() src/addons/ThemeHouse/CustomFieldImporter/Import/Importer/XenForo1.php:159 Stack trace #0 src/addons/ThemeHouse/CustomFieldImporter/Import/Importer/XenForo1.php(159): XF::handlePhpError(2, '[E_WARNING] Inv...', '/opt/bitnami/ap...', 159, Array) #1 src/XF/Import/Runner.php(231): ThemeHouse\CustomFieldImporter\Import\Importer\XenForo1->stepThreadFieldValues(Object(XF\Import\StepState), Array, 8) #2 src/XF/Import/Runner.php(59): XF\Import\Runner->runStep('threadFieldValu...', Object(XF\Import\StepState), 8) #3 src/XF/Admin/Controller/Import.php(234): XF\Import\Runner->run() #4 src/XF/Mvc/Dispatcher.php(321): XF\Admin\Controller\Import->actionRun(Object(XF\Mvc\ParameterBag)) #5 src/XF/Mvc/Dispatcher.php(248): XF\Mvc\Dispatcher->dispatchClass('XF:Import', 'Run', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Import), NULL) #6 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Import), NULL) #7 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch)) #8 src/XF/App.php(2177): XF\Mvc\Dispatcher->run() #9 src/XF.php(390): XF\App->run() #10 admin.php(13): XF::runApp('XF\\Admin\\App') #11 {main} Request state array(4) { ["url"] => string(31) "/community/admin.php?import/run" ["referrer"] => string(51) "xyz/community/admin.php?import/run" ["_GET"] => array(1) { ["import/run"] => string(0) "" } ["_POST"] => array(1) { ["_xfToken"] => string(8) "********" } }
@Jake B. - Tagging you coz you might have unsubscribed to the thread. Would you be able to suggest something here. Thanks!
No, I did not. The classified threads using these custom fields on my forum have a shelf life of only 2-3 weeks. So did not wait for the resolution.Did you find a fix? We've got the same error, assuming because we're importing to XF 2.1
The importer doesn't appear to work with XF 2.1. Before I upgrade my 1.5 forum, I assume I'll need to upgrade to 2.0.x, run the importer, then upgrade to 2.1.
Does anyone have an exact version that works?
The last version of this add-on was released in December, the XF version released just before this add-on was 2.0.12. So try giving that a whirl.Are there any instructions for this importer? When do we run it - before or after upgrading to xf v2? which version of v2.0 is best? Install instructions?
The last version of this add-on was released in December, the XF version released just before this add-on was 2.0.12. So try giving that a whirl.
ErrorException: [E_WARNING] Invalid argument supplied for foreach() in src/addons/ThemeHouse/CustomFieldImporter/Import/Importer/XenForo1.php at line 159
XF::handlePhpError() in src/addons/ThemeHouse/CustomFieldImporter/Import/Importer/XenForo1.php at line 159
ThemeHouse\CustomFieldImporter\Import\Importer\XenForo1->stepThreadFieldValues() in src/XF/Import/Runner.php at line 231
XF\Import\Runner->runStep() in src/XF/Import/Runner.php at line 59
XF\Import\Runner->run() in src/XF/Admin/Controller/Import.php at line 234
XF\Admin\Controller\Import->actionRun() in src/XF/Mvc/Dispatcher.php at line 350
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 257
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2190
XF\App->run() in src/XF.php at line 391
XF::runApp() in admin.php at line 13
We use essential cookies to make this site work, and optional cookies to enhance your experience.