What Do You Need In The Xf2 Xengallery Version? Vote for your choices here: http://www.sonnb.com/threads/what-do-you-need-in-the-xf2-xengallery-version.1539/

Fixed Import Error From Smf Gallery Pro

Discussion in 'Bug Reports' started by Vincent Volmer, Sep 21, 2016.

  1. Vincent Volmer

    Vincent Volmer Authorized Member Authorized

    Hi @sonnb
    I have this error importing SMF Gallery Pro, there is no import, only 1GB of errors in the log....:

    Code:
    ErrorException: Undefined index: id_cat - library/sonnb/XenGallery/Importer/SMFGalleryPro.php:204
    Generated By: Vincent, 13 minutes ago
    
    Stack Trace
    #0 /home/xxxxxxxx/domains/xxxxxxxx.nl/public_html/v3/community/library/sonnb/XenGallery/Importer/SMFGalleryPro.php(204): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/xxxxxxxx...', 204, Array)
    #1 /home/xxxxxxxx/domains/xxxxxxxx.nl/public_html/v3/community/library/XenForo/Importer/Abstract.php(124): sonnb_XenGallery_Importer_SMFGalleryPro->stepAlbums(NULL, Array)
    #2 /home/xxxxxxxx/domains/xxxxxxxx.nl/public_html/v3/community/library/XenForo/ControllerAdmin/Import.php(189): XenForo_Importer_Abstract->runStep(Object(sonnb_XenGallery_XenForo_ControllerAdmin_Import), Object(XenForo_ImportSession), 'albums', NULL, Array)
    #3 /home/xxxxxxxx/domains/xxxxxxxx.nl/public_html/v3/community/library/XenForo/ControllerAdmin/Import.php(137): XenForo_ControllerAdmin_Import->_runStep(Object(sonnb_XenGallery_Importer_SMFGalleryPro), Object(XenForo_ImportSession), 'albums', NULL, Array)
    #4 /home/xxxxxxxx/domains/xxxxxxxx.nl/public_html/v3/community/library/XenForo/FrontController.php(351): XenForo_ControllerAdmin_Import->actionImport()
    #5 /home/xxxxxxxx/domains/xxxxxxxx.nl/public_html/v3/community/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #6 /home/xxxxxxxx/domains/xxxxxxxx.nl/public_html/v3/community/admin.php(13): XenForo_FrontController->run()
    #7 {main}
    Request State
    array(3) {
      ["url"] => string(56) "http://xxxxxxxx.nl/v3/community/admin.php?import/import"
      ["_GET"] => array(1) {
        ["import/import"] => string(0) ""
      }
      ["_POST"] => array(1) {
        ["_xfToken"] => string(8) "********"
      }
    }
    
    Delete... Close

    The SMF Gallery Pro works FINE in SMF forum, the path is correct ....


    Thanks for your help!
    Vincent
     
  2. sonnb

    sonnb Administrator Staff Member

    Hello Vincent,

    You are right, there was a mistake in the code. It should be ID_CAT instead of id_cat. I have just privately send you the updated file. Could you try it out?
     
  3. Vincent Volmer

    Vincent Volmer Authorized Member Authorized

    Ok, thanks! I'll try it!
     
  4. Vincent Volmer

    Vincent Volmer Authorized Member Authorized

    Its importing the images, so..... looks good!
     
  5. Vincent Volmer

    Vincent Volmer Authorized Member Authorized

    At importing the images, I see the same error:

    Code:
    Error Info
    ErrorException: Undefined index: id_cat - library/sonnb/XenGallery/Importer/SMFGalleryPro.php:410
    Generated By: Vincent, A moment ago
    Stack Trace
    
    #0 /home/digiscrap/domains/xxxxxx.nl/public_html/v3/community/library/sonnb/XenGallery/Importer/SMFGalleryPro.php(410): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/xxxxxx...', 410, Array)
    #1 /home/digiscrap/domains/xxxxxx.nl/public_html/v3/community/library/XenForo/Importer/Abstract.php(124): sonnb_XenGallery_Importer_SMFGalleryPro->stepPhotos(3410, Array)
    #2 /home/digiscrap/domains/xxxxxx.nl/public_html/v3/community/library/XenForo/ControllerAdmin/Import.php(189): XenForo_Importer_Abstract->runStep(Object(sonnb_XenGallery_XenForo_ControllerAdmin_Import), Object(XenForo_ImportSession), 'photos', 3410, Array)
    #3 /home/digiscrap/domains/xxxxxx.nl/public_html/v3/community/library/XenForo/ControllerAdmin/Import.php(137): XenForo_ControllerAdmin_Import->_runStep(Object(sonnb_XenGallery_Importer_SMFGalleryPro), Object(XenForo_ImportSession), 'photos', 3410, Array)
    #4 /home/digiscrap/domains/xxxxxx.nl/public_html/v3/community/library/XenForo/FrontController.php(351): XenForo_ControllerAdmin_Import->actionImport()
    #5 /home/digiscrap/domains/xxxxxx.nl/public_html/v3/community/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #6 /home/digiscrap/domains/xxxxxx.nl/public_html/v3/community/admin.php(13): XenForo_FrontController->run()
    #7 {main}
    
    Request State
    
    array(3) {
      ["url"] => string(56) "http://xxxxxx.nl/v3/community/admin.php?import/import"
      ["_GET"] => array(1) {
        ["import/import"] => string(0) ""
      }
      ["_POST"] => array(1) {
        ["_xfToken"] => string(8) "********"
      }
    }
    
    Delete...
    Close
    
     
    Last edited: Sep 26, 2016
  6. Vincent Volmer

    Vincent Volmer Authorized Member Authorized

    I changed one id_cat to ID_CAT on line 410 but at importing Photos nothing is imported..... and no errors in the server log....
     
  7. Vincent Volmer

    Vincent Volmer Authorized Member Authorized

    I did something wrong with the log table. I changed that setting and now it looks like it is importing the Photo's too.... This will take some time because it's a huge gallery ;)

    I'll inform you when the import is ready!
     
  8. Vincent Volmer

    Vincent Volmer Authorized Member Authorized

    Ok, an error.... must be a corrupt image? But the script stopt....
    Code:
    Server Error
    
    md5_file(/home/xxxxxx/domains/xxxxxx.nl/public_html/gallery/19/1480-121211094217.jpeg): failed to open stream: No such file or directory
    
        XenForo_Application::handlePhpError()
        md5_file() in sonnb/XenGallery/Importer/SMFGalleryPro.php at line 435
        sonnb_XenGallery_Importer_SMFGalleryPro->stepPhotos() in XenForo/Importer/Abstract.php at line 124
        XenForo_Importer_Abstract->runStep() in XenForo/ControllerAdmin/Import.php at line 189
        XenForo_ControllerAdmin_Import->_runStep() in XenForo/ControllerAdmin/Import.php at line 137
        XenForo_ControllerAdmin_Import->actionImport() in XenForo/FrontController.php at line 351
        XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
        XenForo_FrontController->run() in /home/xxxxxx/domains/xxxxxx.nl/public_html/v3/community/admin.php at line 13
    
     
  9. Vincent Volmer

    Vincent Volmer Authorized Member Authorized

    I copied an image with the given name
    1480-121211094217.jpeg
    (it wasn't present in the dir). Now the script is running again....
     
  10. Vincent Volmer

    Vincent Volmer Authorized Member Authorized

    Again same error as above, copied an image with the given name and it's running again. The script shouldn't stop at that point IMO. But for now... I know why it stops!
     
  11. Vincent Volmer

    Vincent Volmer Authorized Member Authorized

    Changed id_picture to ID_PICTURE on line 551, script is running again.

    Code:
    ErrorException: Undefined index: id_picture - library/sonnb/XenGallery/Importer/SMFGalleryPro.php:551
    Generated By: Vincent, 1 minute ago
    Stack Trace
    
    #0 /home/xxxxxx/domains/xxxxxx.nl/public_html/v3/community/library/sonnb/XenGallery/Importer/SMFGalleryPro.php(551): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/xxxxxx...', 551, Array)
    #1 /home/xxxxxx/domains/xxxxxx.nl/public_html/v3/community/library/XenForo/Importer/Abstract.php(124): sonnb_XenGallery_Importer_SMFGalleryPro->stepComments(6693, Array)
    #2 /home/xxxxxx/domains/xxxxxx.nl/public_html/v3/community/library/XenForo/ControllerAdmin/Import.php(189): XenForo_Importer_Abstract->runStep(Object(sonnb_XenGallery_XenForo_ControllerAdmin_Import), Object(XenForo_ImportSession), 'comments', 6693, Array)
    #3 /home/xxxxxx/domains/xxxxxx.nl/public_html/v3/community/library/XenForo/ControllerAdmin/Import.php(137): XenForo_ControllerAdmin_Import->_runStep(Object(sonnb_XenGallery_Importer_SMFGalleryPro), Object(XenForo_ImportSession), 'comments', 6693, Array)
    #4 /home/xxxxxx/domains/xxxxxx.nl/public_html/v3/community/library/XenForo/FrontController.php(351): XenForo_ControllerAdmin_Import->actionImport()
    #5 /home/xxxxxx/domains/xxxxxx.nl/public_html/v3/community/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #6 /home/xxxxxx/domains/xxxxxx.nl/public_html/v3/community/admin.php(13): XenForo_FrontController->run()
    #7 {main}
    
    Request State
    
    array(3) {
      ["url"] => string(56) "http://xxxxxxnl/v3/community/admin.php?import/import"
      ["_GET"] => array(1) {
        ["import/import"] => string(0) ""
      }
      ["_POST"] => array(1) {
        ["_xfToken"] => string(8) "********"
      }
    }
    
    Delete...
    Close
    
     
  12. Vincent Volmer

    Vincent Volmer Authorized Member Authorized

    Import ready. Looks fine!
     
  13. sonnb

    sonnb Administrator Staff Member

    Thanks for your helpful information. I have fixed issue on line 551. Also I will add to check the path, if not exists then continue.

    Let me know if you have any further issue.
     
  14. Vincent Volmer

    Vincent Volmer Authorized Member Authorized

    Great!

    I found some other 'small' issues in the gallery mod. I'll collect all information and post it as a new post.

    Thanks!
     
  15. sonnb

    sonnb Administrator Staff Member

    Thanks for your information.
     
  16. Vincent Volmer

    Vincent Volmer Authorized Member Authorized

    Hello, today I found an other issue, or.... I did something wrong ;)

    After the import there are a lot of albums (correct) but In SMF Gallery we use a lot of categories and sub categories. But all categories, including the album (also named category in SMFGallery) are placed on the same level as the "top category". Sorry, it's hard to explain. I'll try to make it more clear with an attached image! ;)

    Maybe I understand the meaning and structure of this new gallery.

    Hope you understand ;)

    Thanks,
    Vincent
     

    Attached Files:

  17. sonnb

    sonnb Administrator Staff Member

    Hello Vincent,

    You did nothing wrong. That is the way how the old SMF Gallery is adapted to the concept of XenGallery. You cannot store the photos directly in the category therefore the old categories that have images will be created as albums. They also be created as category to keep the category structure.
     
  18. Vincent Volmer

    Vincent Volmer Authorized Member Authorized

    Ok, thanks! I understand. One question.... what is the difference between Categories and Collections? So, when do I put Albums in Categories and when in Collections?

    Sorry, this question is off topic...
     

Share This Page