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 Allow_view Errors

Discussion in 'Bug Reports' started by dknife, Mar 9, 2016.

  1. dknife

    dknife YakTribe Gaming Authorized

    I've been getting these errors randomly for awhile, any ideas? Not sure in what situation there would be a ?page=3 initiated?

    Code:
    ErrorException: Undefined index: allow_view - library/sonnb/XenGallery/Model/Album.php:289
    Generated By: Unknown Account, Today at 3:50 AM
    Stack Trace
    #0 /path/to/xenforo/library/sonnb/XenGallery/Model/Album.php(289): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/yaktribe/...', 289, Array)
    #1 /path/to/xenforo/library/sonnb/XenGallery/Model/Album.php(351): sonnb_XenGallery_Model_Album->prepareAlbum(Array, Array, Array)
    #2 /path/to/xenforo/library/sonnb/XenGallery/ControllerPublic/XenGallery.php(89): sonnb_XenGallery_Model_Album->prepareAlbums(Array, Array)
    #3 /path/to/xenforo/library/XenForo/FrontController.php(351): sonnb_XenGallery_ControllerPublic_XenGallery->actionIndex()
    #4 /path/to/xenforo/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #5 /path/to/xenforo/index.php(13): XenForo_FrontController->run()
    #6 {main}
    Request State
    array(3) {
      ["url"] => string(46) "https://yaktribe.org/community/gallery/?page=3"
      ["_GET"] => array(1) {
        ["page"] => string(1) "3"
      }
      ["_POST"] => array(0) {
      }
    }
    Code:
    ErrorException: Undefined index: allow_view - library/sonnb/XenGallery/Model/Album.php:724
    Generated By: Unknown Account, Today at 3:50 AM
    Stack Trace
    #0 /path/to/xenforo/library/sonnb/XenGallery/Model/Album.php(724): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/yaktribe/...', 724, Array)
    #1 /path/to/xenforo/library/sonnb/XenGallery/Model/Album.php(301): sonnb_XenGallery_Model_Album->canViewAlbum(Array, NULL, Array)
    #2 /path/to/xenforo/library/sonnb/XenGallery/Model/Album.php(351): sonnb_XenGallery_Model_Album->prepareAlbum(Array, Array, Array)
    #3 /path/to/xenforo/library/sonnb/XenGallery/ControllerPublic/XenGallery.php(89): sonnb_XenGallery_Model_Album->prepareAlbums(Array, Array)
    #4 /path/to/xenforo/library/XenForo/FrontController.php(351): sonnb_XenGallery_ControllerPublic_XenGallery->actionIndex()
    #5 /path/to/xenforo/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #6 /path/to/xenforo/index.php(13): XenForo_FrontController->run()
    #7 {main}
    Request State
    array(3) {
      ["url"] => string(46) "https://yaktribe.org/community/gallery/?page=3"
      ["_GET"] => array(1) {
        ["page"] => string(1) "3"
      }
      ["_POST"] => array(0) {
      }
    }
     
  2. sonnb

    sonnb Administrator Staff Member

    This is not the issue of page 3 but the issue of an album in page 3. Could you check what is the album and give me its information?
     
  3. dknife

    dknife YakTribe Gaming Authorized

    How am I supposed to know what the album is? There's nothing in the URL to indicate as such.
     
  4. sonnb

    sonnb Administrator Staff Member

    You cannot know unless you access to the error album. As an admin, who can view any album, you will not see the issue but with normal user, you will see.
     
  5. sonnb

    sonnb Administrator Staff Member

    Added a check to prevent this issue.
     
    dknife likes this.
  6. dknife

    dknife YakTribe Gaming Authorized

    Just in case you need to add extra checks, I'm now getting them for other types

    ErrorException: Undefined index: allow_add_photo - library/sonnb/XenGallery/Model/Album.php:804
    Generated By: Chief Tugboat, 4 minutes ago
    Stack Trace
    #0 /home/yaktribe/public_html/community/library/sonnb/XenGallery/Model/Album.php(804): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/yaktribe/...', 804, Array)
    #1 /home/yaktribe/public_html/community/library/sonnb/XenGallery/Model/Album.php(306): sonnb_XenGallery_Model_Album->canAddPhoto(Array, NULL, Array)
    #2 /home/yaktribe/public_html/community/library/sonnb/XenGallery/Model/Album.php(351): sonnb_XenGallery_Model_Album->prepareAlbum(Array, Array, Array)
    #3 /home/yaktribe/public_html/community/library/sonnb/XenGallery/ControllerPublic/XenGallery.php(89): sonnb_XenGallery_Model_Album->prepareAlbums(Array, Array)
    #4 /home/yaktribe/public_html/community/library/XenForo/FrontController.php(351): sonnb_XenGallery_ControllerPublic_XenGallery->actionIndex()
    #5 /home/yaktribe/public_html/community/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #6 /home/yaktribe/public_html/community/index.php(13): XenForo_FrontController->run()
    #7 {main}
    Request State
    array(3) {
    ["url"] => string(46) "https://yaktribe.org/community/gallery/?page=3"
    ["_GET"] => array(1) {
    ["page"] => string(1) "3"
    }
    ["_POST"] => array(0) {
    }
    }

    ErrorException: Undefined index: allow_comment - library/sonnb/XenGallery/Model/Album.php:758
    Generated By: Chief Tugboat, 6 minutes ago
    Stack Trace
    #0 /home/yaktribe/public_html/community/library/sonnb/XenGallery/Model/Album.php(758): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/yaktribe/...', 758, Array)
    #1 /home/yaktribe/public_html/community/library/sonnb/XenGallery/Model/Album.php(302): sonnb_XenGallery_Model_Album->canCommentAlbum(Array, NULL, Array)
    #2 /home/yaktribe/public_html/community/library/sonnb/XenGallery/Model/Album.php(351): sonnb_XenGallery_Model_Album->prepareAlbum(Array, Array, Array)
    #3 /home/yaktribe/public_html/community/library/sonnb/XenGallery/ControllerPublic/XenGallery.php(89): sonnb_XenGallery_Model_Album->prepareAlbums(Array, Array)
    #4 /home/yaktribe/public_html/community/library/XenForo/FrontController.php(351): sonnb_XenGallery_ControllerPublic_XenGallery->actionIndex()
    #5 /home/yaktribe/public_html/community/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #6 /home/yaktribe/public_html/community/index.php(13): XenForo_FrontController->run()
    #7 {main}
    Request State
    array(3) {
    ["url"] => string(46) "https://yaktribe.org/community/gallery/?page=3"
    ["_GET"] => array(1) {
    ["page"] => string(1) "3"
    }
    ["_POST"] => array(0) {
    }
    }
     
  7. sonnb

    sonnb Administrator Staff Member

    Thanks. Does they come from an Import or something? Or manually created album?
     
  8. dknife

    dknife YakTribe Gaming Authorized

  9. sonnb

    sonnb Administrator Staff Member

    I have added some checks to prevent this error.
     
Tags: album

Share This Page