[xfr import] Import fails around 20%

Ladegro

Active member
Hi there,

Trying to import from XFR User Albums. All seems to go well, until the following error shows:
upload_2015-2-8_12-53-6.webp
I've tried to uninstall the addon and retry three times now, but every time it keeps failing at a point.
After clicking around a little bit in the admin panel, I'm allowed to 'proceed' with migration, and while the status progresses to 100% and all seems fine, no more photo's are actually migrated after the point of error.

I've checked in Tools - Attachments - default image processor that it is set to Imageick.
I've selected to import global albums as categories, as that was the way we used to use the XFR gallery. I've not set to keep old ID's but create new ones, as this is a blank installation of XFMG.

Any suggestions?
 
There's possibly a code based solution to get it to silently fail. In the file library/XenGallery/Helper/Image.php line 326 begins:
PHP:
if ($imageSaveFunc == 'imageJPG' || $imageSaveFunc == 'ImageJPEG')
{
    if (!$imageSaveFunc($imageC, $this->tmpFile, $jpgQuality))
    {
        throw new Exception('Cannot save file ' . $this->tmpFile);
    }
}
else
{
    if (!$imageSaveFunc($imageC, $this->tmpFile))
    {
        throw new Exception('Cannot save file ' . $this->tmpFile);
    }
}

Change that to:
PHP:
if ($imageSaveFunc == 'imageJPG' || $imageSaveFunc == 'ImageJPEG')
{
    if (!@$imageSaveFunc($imageC, $this->tmpFile, $jpgQuality))
    {
        //throw new Exception('Cannot save file ' . $this->tmpFile);
    }
}
else
{
    if (!@$imageSaveFunc($imageC, $this->tmpFile))
    {
        //throw new Exception('Cannot save file ' . $this->tmpFile);
    }
}

This is a horrible solution for a number of reasons, but it should allow the process to continue if it finds any images that it can't process for some reason.
 
Well, it gives the exact same error, but this time right after clicking the Import Images button. So definitely not at the same point...

Ah thanks Chris, gonna give that a try...
 
Ehmz.... now it is doing as if it is importing:
upload_2015-2-8_13-40-31.webp

but in the database, no entries are being made in the xengallery_media table :-(
upload_2015-2-8_13-41-6.webp

This is my Image.php:

upload_2015-2-8_13-41-41.webp

Result:
upload_2015-2-8_13-56-49.webp
 
Last edited:
If you're able to give me FTP access to the server, an Admin CP login and PHPMyAdmin access, I will see if I can debug this in more detail.

Submit a ticket from your customer area with the details and I'll take a look.
 
Chris found a solution for me- it was stopping at the same point each time. It was some rotten files that were stopping it. He modified the vbulletin42x.php file and it skipped the bad files.

Frankly, I would have deleted them - it was only 10 or so files that were stopping the works. My users could reinstall them later or something. Not worth it.
 
Chris already debugged this case and it appears to have to do with available storage space. We will continue this tomorrow to see if expanding that indeed solves this case.
 
@Chris D I have the same error like Nelson T. or Ladegro

Code:
ErrorException: Fatal Error: imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error: Empty input file - library/XenGallery/Helper/Image.php:313

I think there are some rotten or defect images, so maybe you remember what you've changed to skip the bad ones in vbulletin42x.php?
 
Last edited:
Top Bottom