MG 1.1 Import Problem...

viaBowl

Member
I'm importing from PhotoPost vBgallery for a client and all is going well so far.

Except for one thing: getimagesize(): corrupt JPEG data: 2 extraneous bytes before marker

Anyone know of a quick way to track down which image this error is happening in? There's nothing in the stack that lets me know where to look for the offending image and either replace it or delete it.

Or, can someone tell me quickly what file to edit to ignore this error and move on? This is a HUGE gallery and i wanna get the import done :)
 
The first thing to do might be to switch to a different PHP version, if possible and easy to do - some hosts allow it just by switching the version in cPanel or via a config file. (The latest XF version supports up to PHP 7.1).

Sometimes there are bugs within GD functions that can cause unexpected errors. Sometimes even switching to a higher 3rd point PHP release might improve things.

If this isn't doable, you might be able to track down the last image that was imported successfully and delete the next one. If you have retained content IDs this is easier, as you can just look at the xengallery_media table for the last ID that was imported, and that ID will correspond to the imageid in the ppgal_images table. The one after that is likely to be the problematic one.

If you have retained the IDs, you may find that after you try to continue the import you will get duplicate content errors. If that's the case, you will need to remove those, too, but they will get re-imported.

If you haven't retained the IDs it will be much harder, but you might be able to visually track down the last successful image just by viewing it in the gallery, and looking at the dates.
 
i'm running php 7.0.14 FastCGI via Plesk. it's only one image so far. thousands have imported fine thus far.

Now, i've tried using the Mogrify command to convert it to png and back to get rid of the error... that didnt work.
I tried deleting it from the vb original database. to simply skip it.... that didnt work.

Everytime I go back to CONTINUE the import, i get the same error.
 
well the stack gives the ID, and from there, i go into the database, get the exif blob to get the file name, and now i'm gonna see if that works.


nope.... didnt work.
 
Last edited:
There is no queue. The importer will simply be set to continue at a specific ID. If the problematic one is no longer in the database, it won't attempt to import it. If the problem persists, either the wrong one has been removed or there is another one.
 
Don't know what to tell you. If you think about it logically, if the entry isn't in the database anymore, we can't even attempt to try and import it, so something is going wrong with your process somewhere which means that there are additional images that need deleting or you are deleting the wrong one.

Where exactly are you getting the ID? Can you clarifiy what the current error is you're getting?
 
This gets thrown: ErrorException: getimagesize(): corrupt JPEG data: 2 extraneous bytes before marker - library/XenGallery/Helper/Image.php:84

The stack:

#0 [internal function]: XenForo_Application::handlePhpError(2, 'getimagesize():...', '/var/www/vhosts...', 84, Array)
#1 /var/www/vhosts/<clientsDomain>.com/http/www/library/XenGallery/Helper/Image.php(84): getimagesize('/var/www/vhosts...')
#2 /var/www/vhosts/<clientsDomain>.com/http/www/library/XenGallery/Helper/Image.php(54): XenGallery_Helper_Image->_readImageInfo()
#3 /var/www/vhosts/<clientsDomain>.com/http/www/library/XenGallery/Model/Importers.php(191): XenGallery_Helper_Image->__construct('/var/www/vhosts...')
#4 /var/www/vhosts/<clientsDomain>.com/http/www/library/XenGallery/Importer/PhotopostVbGallery.php(878): XenGallery_Model_Importers->importMedia(3264, '/var/www/vhosts...', '', Array, Array, Array)
#5 /var/www/vhosts/<clientsDomain>.com/http/www/library/XenGallery/Importer/PhotopostVbGallery.php(745): XenGallery_Importer_PhotopostVbGallery->_importMedia(Array, Array)
#6 /var/www/vhosts/<clientsDomain>.com/http/www/library/XenForo/Importer/Abstract.php(124): XenGallery_Importer_PhotopostVbGallery->stepMedia(3262, Array)
#7 /var/www/vhosts/<clientsDomain>.com/http/www/library/XenForo/ControllerAdmin/Import.php(189): XenForo_Importer_Abstract->runStep(Object(XenForo_ControllerAdmin_Import), Object(XenForo_ImportSession), 'media', 3262, Array)
#8 /var/www/vhosts/<clientsDomain>.com/http/www/library/XenForo/ControllerAdmin/Import.php(137): XenForo_ControllerAdmin_Import->_runStep(Object(XenGallery_Importer_PhotopostVbGallery), Object(XenForo_ImportSession), 'media', 3262, Array)
#9 /var/www/vhosts/<clientsDomain>.com/http/www/library/XenForo/FrontController.php(351): XenForo_ControllerAdmin_Import->actionImport()
#10 /var/www/vhosts/<clientsDomain>.com/http/www/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#11 /var/www/vhosts/<clientsDomain>.com/http/www/admin.php(13): XenForo_FrontController->run()
#12 {main}

Request;
array(3) {
["url"] => string(50) "http://www.<clientsDomain>.com/admin.php?import/import"
["_GET"] => array(1) {
["import/import"] => string(0) ""
}
["_POST"] => array(1) {
["_xfToken"] => string(8) "********"
}
}
 
Is this the ID? 3262

As I mentioned before, that's the ID it starts at. The one it is failing on might be after that. You should be able to identify which one it is by looking at the last one that has been imported.
 
i just restarted the import over from scratch, and deleted the offending media. now it's gotten as far as 65.31% and now it seems to be in some kind of infinite loop. the page refreshes and it's going nowhere. :(

strange: i deleted the next in line from the source db, and it's going again. this is a very eccentric import system.
 
Top Bottom