1. 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%

Discussion in 'Media Gallery Support' started by Ladegro, Feb 8, 2015.

  1. Ladegro

    Ladegro 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.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?
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Does it always fail at the same point - i.e. the same image?

    Or is it random?
     
  3. Ladegro

    Ladegro Member

    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?
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    You may need to check the database or file system to see what the last record is.
     
  5. Ladegro

    Ladegro Member

    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
     
  6. Chris D

    Chris D XenForo Developer Staff Member

    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. Ladegro

    Ladegro Member

    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. Ladegro

    Ladegro Member

    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: Feb 8, 2015
  9. Chris D

    Chris D XenForo Developer Staff Member

    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.
     
  10. Nelson T.

    Nelson T. Guest

    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. Ladegro

    Ladegro Member

    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.
     
  12. Ladegro

    Ladegro Member

    It indeed appeared to be caused by not enough disk space. After upgrading the hosting package, everything went fine. Thanks Chris for all support.
     
    Chris D likes this.

Share This Page