Fixed Undefined index: album_user_id

imthebest

Well-known member
This is very similar to this one (already fixed).

Code:
ErrorException: Undefined index: album_user_id - library/XenGallery/Model/Category.php:331
Generated By: someone, Yesterday, 20:40
Stack Trace

#0 /var/www/html/library/XenGallery/Model/Category.php(331): XenForo_Application::handlePhpError(8, 'Undefined index...', '/var/www/html/l...', 331, Array)
#1 /var/www/html/library/XenGallery/ControllerPublic/Comment.php(447): XenGallery_Model_Category->getCategoryBreadcrumb(Array)
#2 /var/www/html/library/XenForo/FrontController.php(347): XenGallery_ControllerPublic_Comment->actionReport()
#3 /var/www/html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#4 /var/www/html/index.php(13): XenForo_FrontController->run()
#5 {main}

Request State

array(3) {
  ["url"] => string(222) "http://www.mysite.com/gallery/comments/46166/report?&_xfRequestUri=%2Fgallery%2Fbeautiful-amazing.64843%2F&_xfNoRedirect=1&_xfToken=232975%2C1421372446%2C821a160143b595fb9fcfdc66da71d90dccfc0978&_xfResponseType=json"
  ["_GET"] => array(4) {
    ["_xfRequestUri"] => string(37) "/gallery/beautiful-amazing.64843/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(58) "232975,1421372446,821a160143b595fb9fcfdc66da71d90dccfc0978"
    ["_xfResponseType"] => string(4) "json"
  }
  ["_POST"] => array(0) {
  }
}
 

Chris D

XenForo developer
Staff member
Can't currently reproduce this.

It looks like it happens when reporting a comment on a media item.

So, is the media deleted? Is it viewable? Is it private? Is it in a deleted album? Is it in a category? I basically need some more info :)
 

imthebest

Well-known member
Got another one logged:

Code:
ErrorException: Undefined index: album_user_id - library/XenGallery/Model/Category.php:331
Generated By: someone, 24 minutes ago
Stack Trace

#0 /var/www/html/library/XenGallery/Model/Category.php(331): XenForo_Application::handlePhpError(8, 'Undefined index...', '/var/www/html/l...', 331, Array)
#1 /var/www/html/library/XenGallery/ControllerPublic/Comment.php(447): XenGallery_Model_Category->getCategoryBreadcrumb(Array)
#2 /var/www/html/library/XenForo/FrontController.php(347): XenGallery_ControllerPublic_Comment->actionReport()
#3 /var/www/html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#4 /var/www/html/index.php(13): XenForo_FrontController->run()
#5 {main}

Request State

array(3) {
  ["url"] => string(200) "http://www.mysite.com/gallery/comments/46195/report?&_xfRequestUri=%2Fgallery%2F64619%2F&_xfNoRedirect=1&_xfToken=190705%2C1421464504%2C8e57dc429b123b16b60dc800bd5c1e07c8607748&_xfResponseType=json"
  ["_GET"] => array(4) {
    ["_xfRequestUri"] => string(15) "/gallery/64619/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(58) "190705,1421464504,8e57dc429b123b16b60dc800bd5c1e07c8607748"
    ["_xfResponseType"] => string(4) "json"
  }
  ["_POST"] => array(0) {
  }
}
 

imthebest

Well-known member
Viewable media on a public album, no categories at all on my Gallery... just user albums.

This gallery is an import from vBulletin's 3.8 user albums.
 

Chris D

XenForo developer
Staff member
Thanks, I actually triggered this here, yesterday, and hadn't realised.

Consider this fixed. You can safely ignore any further error logs.

The fix is quite simple if you wanted to patch it yourself.

File: library/XenGallery/Model/Comment.php
Line: 947

Find:
PHP:
album.album_username, albumviewperm.*';
Replace:
PHP:
album.album_user_id, album.album_username, albumviewperm.*';
 

imthebest

Well-known member
This just happened today again. Using XFMG 1.0.2

Code:
ErrorException: Undefined index: album_user_id - library/XenGallery/Model/Category.php:331
Generated By: someone, Today, 00:14
Stack Trace

#0 /var/www/html/library/XenGallery/Model/Category.php(331): XenForo_Application::handlePhpError(8, 'Undefined index...', '/var/www/html/l...', 331, Array)
#1 /var/www/html/library/XenGallery/ControllerPublic/Comment.php(447): XenGallery_Model_Category->getCategoryBreadcrumb(Array)
#2 /var/www/html/library/XenForo/FrontController.php(347): XenGallery_ControllerPublic_Comment->actionReport()
#3 /var/www/html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#4 /var/www/html/index.php(13): XenForo_FrontController->run()
#5 {main}

Request State

array(3) {
  ["url"] => string(214) "http://www.mysite.com/gallery/comments/45490/report?&_xfRequestUri=%2Fgallery%2Frandom-album.64177%2F&_xfNoRedirect=1&_xfToken=220159%2C1422508461%2Cdc7e2f14cea00b775ba81a72a3246054e19a927b&_xfResponseType=json"
  ["_GET"] => array(4) {
    ["_xfRequestUri"] => string(29) "/gallery/random-album.64177/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(58) "220159,1422508461,dc7e2f14cea00b775ba81a72a3246054e19a927b"
    ["_xfResponseType"] => string(4) "json"
  }
  ["_POST"] => array(0) {
  }
}
Could you please double check if it is properly fixed?
 

Chris D

XenForo developer
Staff member
I have double checked, it is properly fixed.

Can you reproduce it over and over again?
 

Chris D

XenForo developer
Staff member
Ok.

Open this file: library/XenGallery/Model/Comment.php

What do you see on line 947?
 

imthebest

Well-known member
  • #11
Just checked and I can confirm that file library/XenGallery/Model/Comment.php on line 947 of your XFMG 1.0.2 package still contains this:

Code:
album.album_username, albumviewperm.*';
Instead of:

Code:
album.album_user_id, album.album_username, albumviewperm.*';
As stated by you on post #5 of this thread.

MD5 of XFMG 1.0.2's library/XenGallery/Model/Comment.php: 027f84d8e42557b20d022328c12c2d27
 

Chris D

XenForo developer
Staff member
  • #12
This bug was reported and fixed after XFMG 1.0.2 was released. The fix is due in 1.0.3. The instructions in post #5 were for you to follow in the meantime if you wanted it fixed sooner.
 

imthebest

Well-known member
  • #13
My bad, sorry... I thought the fix was included in 1.0.2

Again, sorry for making you to lose time on this :unsure:
 
Top