src/addons/XFMG/Service/Album/ThumbnailGenerator.php
.$itemTempFile = File::copyAbstractedPathToTempFile($mediaItem->getAbstractedThumbnailPath());
$thumbPath = $mediaItem->getAbstractedThumbnailPath();
if (!File::abstractedPathExists($thumbPath))
{
continue;
}
$itemTempFile = File::copyAbstractedPathToTempFile($thumbPath);
@Chris D- It worked, however as others have reported in previous comments, you cannot import "likes" or it throws an error. I'm not worried about the likes, but I thought you should know. Are we allowed to send you a PayPal for creating this importer?@ActorMike this may be an XFMG bug.
Let us know if that fixes the problem and I will get XFMG patched for the next release.
This is important to me too.Does anyone have any URL rewrites (preferably nginx) so that after the conversion old URL's still point to the newly imported data?
Will it work with a 1.4 database as this is what we're moving from?Chris D updated sonnb XenGallery 2.x to XenForo Media Gallery 2.1.x with a new update entry:
Fixes a missing table error during import
Read the rest of this update entry...
Great yeah currently running XenForo 1.4.2, it's been a while. Just waiting for Brogan to help with the update then I can run this. The gallery import is crucial for me. Should I remove or untick the likes import seeing as many people have said this isn't effective? Likes are not important at all.XF 1.4? The XF version shouldn't make a difference, we're only looking for a XenGallery 2.x database.
Can anyone tell me how to do this? I get the same "Duplicate entry" error but would love to finalize this import...We didn't need to import the likes, so we just commented that part of the code out.
What are the default paths to go in the Source database configuration?set up any importer
Server error log
XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry '52' for key 'PRIMARY' src/XF/Db/AbstractStatement.php:228
Generated by: Alex Apr 28, 2021 at 7:20 PM
Stack trace
INSERT INTO `xf_reaction_content` (`reaction_content_id`, `reaction_id`, `content_type`, `content_id`, `reaction_user_id`, `reaction_date`, `content_user_id`, `is_counted`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
------------
#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1062, '23000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1062, '23000')
#2 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(218): XF\Db\AbstractAdapter->query('INSERT INTO `x...', Array)
#4 src/XF/Import/Data/EntityEmulator.php(327): XF\Db\AbstractAdapter->insert('xf_reaction_con...', Array)
#5 src/XF/Import/Data/AbstractEmulatedData.php(71): XF\Import\Data\EntityEmulator->insert(52, Object(XF\Db\Mysqli\Adapter))
#6 src/XF/Import/Data/AbstractData.php(127): XF\Import\Data\AbstractEmulatedData->write(52)
#7 src/addons/XG2XFMG/Import/Importer/XenGallery.php(779): XF\Import\Data\AbstractData->save(52)
#8 src/XF/Import/Runner.php(242): XG2XFMG\Import\Importer\XenGallery->stepLikes(Object(XF\Import\StepState), Array, 8)
#9 src/XF/Import/Runner.php(59): XF\Import\Runner->runStep('likes', Object(XF\Import\StepState), 8)
#10 src/XF/Admin/Controller/Import.php(234): XF\Import\Runner->run()
#11 src/XF/Mvc/Dispatcher.php(350): XF\Admin\Controller\Import->actionRun(Object(XF\Mvc\ParameterBag))
#12 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Import', 'Run', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Import), NULL)
#13 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Import), NULL)
#14 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#15 src/XF/App.php(2326): XF\Mvc\Dispatcher->run()
#16 src/XF.php(488): XF\App->run()
#17 admin.php(13): XF::runApp('XF\\Admin\\App')
#18 {main}
Request state
array(4) {
["url"] => string(21) "/admin.php?import/run"
["referrer"] => string(50) "https://staging.site.com/admin.php?import/"
["_GET"] => array(1) {
["import/run"] => string(0) ""
}
["_POST"] => array(1) {
["_xfToken"] => string(8) "********"
}
}
Getting the same errors on command line import: I've deleted about 5 of these manually but it keeps happening on subsequent numbers..I'm also getting a duplicate entry error.
Code:Server error log XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry '52' for key 'PRIMARY' src/XF/Db/AbstractStatement.php:228 Generated by: Alex Apr 28, 2021 at 7:20 PM Stack trace INSERT INTO `xf_reaction_content` (`reaction_content_id`, `reaction_id`, `content_type`, `content_id`, `reaction_user_id`, `reaction_date`, `content_user_id`, `is_counted`) VALUES (?, ?, ?, ?, ?, ?, ?, ?) ------------ #0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1062, '23000') #1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1062, '23000') #2 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute() #3 src/XF/Db/AbstractAdapter.php(218): XF\Db\AbstractAdapter->query('INSERT INTO `x...', Array) #4 src/XF/Import/Data/EntityEmulator.php(327): XF\Db\AbstractAdapter->insert('xf_reaction_con...', Array) #5 src/XF/Import/Data/AbstractEmulatedData.php(71): XF\Import\Data\EntityEmulator->insert(52, Object(XF\Db\Mysqli\Adapter)) #6 src/XF/Import/Data/AbstractData.php(127): XF\Import\Data\AbstractEmulatedData->write(52) #7 src/addons/XG2XFMG/Import/Importer/XenGallery.php(779): XF\Import\Data\AbstractData->save(52) #8 src/XF/Import/Runner.php(242): XG2XFMG\Import\Importer\XenGallery->stepLikes(Object(XF\Import\StepState), Array, 8) #9 src/XF/Import/Runner.php(59): XF\Import\Runner->runStep('likes', Object(XF\Import\StepState), 8) #10 src/XF/Admin/Controller/Import.php(234): XF\Import\Runner->run() #11 src/XF/Mvc/Dispatcher.php(350): XF\Admin\Controller\Import->actionRun(Object(XF\Mvc\ParameterBag)) #12 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Import', 'Run', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Import), NULL) #13 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Import), NULL) #14 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch)) #15 src/XF/App.php(2326): XF\Mvc\Dispatcher->run() #16 src/XF.php(488): XF\App->run() #17 admin.php(13): XF::runApp('XF\\Admin\\App') #18 {main} Request state array(4) { ["url"] => string(21) "/admin.php?import/run" ["referrer"] => string(50) "https://staging.site.com/admin.php?import/" ["_GET"] => array(1) { ["import/run"] => string(0) "" } ["_POST"] => array(1) { ["_xfToken"] => string(8) "********" } }
I seem to be missing a fair few personal albums, so not sure if the error above caused the import not to complete properly.
Exception query:
INSERT INTO `xf_reaction_content` (`reaction_content_id`, `reaction_id`, `content_type`, `content_id`, `reaction_user_id`, `reaction_date`, `content_user_id`, `is_counted`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
[20:21][root public]# php cmd.php xf:import
Starting import from sonnb XenGallery 2.x (Beta)...
- Importing...
In AbstractStatement.php line 228:
MySQL query error [1062]: Duplicate entry '265695' for key 'PRIMARY'
xf:import [--processes PROCESSES] [--finalize]
Exception query:
INSERT INTO `xf_reaction_content` (`reaction_content_id`, `reaction_id`, `content_type`, `content_id`, `reaction_user_id`, `reaction_date`, `content_user_id`, `is_counted`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
[20:21][root public]# php cmd.php xf:import-finalize
The import session is not yet completed.
We use essential cookies to make this site work, and optional cookies to enhance your experience.