• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

[xfr import] Import fails around 20%

#1
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.png
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?
 
#3
How can I see that? I leave the tab running for a while and then it backs out. Does it say at which image that is happening somewhere?
 
#5
Okay I noted the last imagename and category, now going to uninstall the addon again and try everything for a fourth time...
upload_2015-2-8_13-15-30.png
upload_2015-2-8_13-15-38.png
 

Chris D

XenForo developer
Staff member
#6
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.
 
#7
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...
 
#8
Ehmz.... now it is doing as if it is importing:
upload_2015-2-8_13-40-31.png

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

This is my Image.php:

upload_2015-2-8_13-41-41.png

Result:
upload_2015-2-8_13-56-49.png
 
Last edited:

Chris D

XenForo developer
Staff member
#9
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.
 
N

Nelson T.

Guest
#10
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.
 
#11
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.
 
#13
@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: