Bug XF2: Importer from Audentio to Dragonbyte

Status
Not open for further replies.
Hello, when trying to import from AD to DB I encounter the following error:

Code:
InvalidArgumentException: Unknown column 'start_date' in src/XF/Import/Data/EntityEmulator.php at line 100

    XF\Import\Data\EntityEmulator->set() in src/XF/Import/Data/AbstractEmulatedData.php at line 24
    XF\Import\Data\AbstractEmulatedData->set() in src/XF/Import/Data/AbstractData.php at line 97
    XF\Import\Data\AbstractData->bulkSet() in src/addons/DBTech/Donate/Import/Importer/AudentioDonationManager.php at line 232
    DBTech\Donate\Import\Importer\AudentioDonationManager->stepDrives() 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 line 232
    XF\Admin\Controller\Import->actionRun() in src/XF/Mvc/Dispatcher.php at line 249
    XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 88
    XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
    XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1891
    XF\App->run() in src/XF.php at line 328
    XF::runApp() in admin.php at line 13

What can I do to fix this?
 
I redownloaded and reinstalled the v3 version for xf2 and when trying to do the import I now receive:
Code:
XF\Db\Exception: MySQL statement prepare error [1146]: Table 'xenforodb.dbtech_donate_drive' doesn't exist in src/XF/Db/AbstractStatement.php at line 212

    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 39
    XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 54
    XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 79
    XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 160
    XF\Db\AbstractAdapter->insert() in src/XF/Import/Data/EntityEmulator.php at line 320
    XF\Import\Data\EntityEmulator->insert() in src/XF/Import/Data/AbstractEmulatedData.php at line 39
    XF\Import\Data\AbstractEmulatedData->write() in src/XF/Import/Data/AbstractData.php at line 126
    XF\Import\Data\AbstractData->save() in src/addons/DBTech/Donate/Import/Importer/AudentioDonationManager.php at line 252
    DBTech\Donate\Import\Importer\AudentioDonationManager->stepDrives() 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 line 232
    XF\Admin\Controller\Import->actionRun() in src/XF/Mvc/Dispatcher.php at line 249
    XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 88
    XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
    XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1891
    XF\App->run() in src/XF.php at line 328
    XF::runApp() in admin.php at line 13

which sort of makes sense, since xenforodb.dbtech_donate_drive doesn't excist! The proper table name is xf_dbtech_donate_drive, not sure why it takes xenforodb (the database name) as table prefix?
 
I've applied another hotfix, sorry about that. Can you tell I dry-coded these without any source databases to test on? :P
 
lol yeah, I noticed. If you want I can supply you with my database for testing, I think I got old merc donation tables in my xenforo database as well.
 
I'm hoping this will be the last of the issues, as the XF1 importers sort of worked. It's just a case of some minor copy/pasting issues. If reports continue I may need to take you up on that :D
 
Currently amidst of doing the last step where it has to rebuild the caches. Looks like the import worked this time. The only error I got were server errors from undefined indexes. I think addm_currency comes from the Core Credit addon of Audentio and shouldn't be there normally. I'll keep you posted if something goes wrong :p



2018-04-27 23_28_21-Server error logs _ Minecraft Middle Earth - Admin control panel.webp
 
That is looking for the currency option that should have been in the ADDM database settings. Is the mod no longer installed in the source DB?
 
Hmm, no I can't find it in the addm_ tables. Installation itself didn't go supersmooth. After the import I noticed the internal pages gave 'Could not be found'. So I uninstalled and installed the addon again and redid the import process. It seems to have imported now, but this error appeared after the import.

Also when I visit the donation drive that it imported, I receive the following errors in the admin panel and the user viewport:

2018-04-28 03_47_32-Server error logs _ Minecraft Middle Earth - Admin control panel.webp2018-04-28 03_48_18-(2) Oops! We ran into some problems. _ Minecraft Middle Earth.webp
 
It would be in the setting table, not in an addm_ table.

The most logical reason I can think of for why that would happen would be if you had imported donations from users who don’t exist in your current DB. Is that the case?
 
I do remember that I uninstalled the Audentio addon once which removed all the tables. I then imported the addm_* tables from a backup database into the database assuming all the data I would need was inside there.

It's possible that some of the users who previously donated are now no longer in the system because of a hard delete, could that be because of this?
 
I do remember that I uninstalled the Audentio addon once which removed all the tables. I then imported the addm_* tables from a backup database into the database assuming all the data I would need was inside there.
Sorry, data from the settings table also needs to be in there in order for an import to succeed. Your best bet would be to reinstall the mod, configure it the way it was, then reimport the addm_ tables from a backup database, then do another import. If you don't do this, the import cannot succeed.

It's possible that some of the users who previously donated are now no longer in the system because of a hard delete, could that be because of this?
It's very possible that hard deleted users will cause an issue such as this. I would recommend running a query like this (untested so may need modification):
SELECT DISTINCT userid FROM xf_dbtech_donate_donation AS donation LEFT JOIN xf_user AS user ON(user.user_id = donation.userid) WHERE user.user_id IS NULL

If that returns records, you should delete records from the source DB that match all those user IDs to prevent them from being imported in the future.
 
Sorry, data from the settings table also needs to be in there in order for an import to succeed. Your best bet would be to reinstall the mod, configure it the way it was, then reimport the addm_ tables from a backup database, then do another import. If you don't do this, the import cannot succeed.

The issue is that I can't reinstall the Audentio mod because it's from Xenforo 1 and im on Xenforo 2 already. I do have a pre-xenforo 2 installation though with outdated content, I could get all the stuff from that database.

If the settings are not in the addm tables, where can I find those?

It's very possible that hard deleted users will cause an issue such as this. I would recommend running a query like this (untested so may need modification):
SELECT DISTINCT userid FROM xf_dbtech_donate_donation AS donation LEFT JOIN xf_user AS user ON(user.user_id = donation.userid) WHERE user.user_id IS NULL

Yeah two ID's returned, so I'll have to modify the addm tables to either merge with another excisting user or delete these entries prior to the import? Also one of the ID's is 0, it looks like this is used for Guest donations?
 
Last edited:
The issue is that I can't reinstall the Audentio mod because it's from Xenforo 1 and im on Xenforo 2 already. I do have a pre-xenforo 2 installation though with outdated content, I could get all the stuff from that database.

If the settings are not in the addm tables, where can I find those?
The xf_option table. The addm entries in the option table need to be present in the source DB you're importing from.

Yeah two ID's returned, so I'll have to modify the addm tables to either merge with another excisting user or delete these entries prior to the import? Also one of the ID's is 0, it looks like this is used for Guest donations?
I would say that you should assign guest donations to an existing user, XF2 doesn't support guest donations at the moment so I don't believe I've made any efforts to support them in the mod as it is. To be safe, it's probably best to assign them to a "bot user" or something.
 
Allright. I will try that. Also do you have any idea how to get rid of the 'import is complete'? The page keeps showing up after I reinstalled DBDonate2018-04-28 15_30_11-Import complete! _ Minecraft Middle Earth - Admin control panel.webp

edit: never mind. That table was empty and pressing complete didn't seem to break anything :P
 
Last edited:
You need to press complete then finalize, otherwise the import isn't technically final.
 
Status
Not open for further replies.

DragonByte Donate

XenForo 1.5.3+ XenForo 2.0.x XenForo 2.1.x XenForo 2.2.x XenForo 2.3.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
1,768
Customer rating
5.00 star(s) 1 ratings
Back
Top