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

Fixed Deleted user uploads images

tommydamic68

Well-known member
#1
This is strange, I had an image in the moderation Que. When viewing media, its a "deleted user." After searching the ip of this user it is in fact a valid user. Also, not sure if its the same issue, a server error appeared.

Code:
ErrorException: Undefined index: xengallery_media_quota - library/XenForo/Visitor.php:678
Generated By: Unknown Account, Today at 12:58 PM
Stack Trace
#0 /home/admin/public_html/community/library/XenForo/Visitor.php(678): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/admin/pub...', 678, Array)
#1 /home/admin/public_html/community/library/XenGallery/ControllerPublic/File.php(175): XenForo_Visitor->offsetGet('xengallery_medi...')
#2 /home/admin/public_html/community/library/XenForo/FrontController.php(347): XenGallery_ControllerPublic_File->actionDoUpload()
#3 /home/admin/public_html/community/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#4 /home/admin/public_html/community/index.php(13): XenForo_FrontController->run()
#5 {main}
Request State
array(3) {
  ["url"] => string(53) "http://.com/community/media/files/do-upload"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(9) {
    ["_xfToken"] => string(8) "********"
    ["hash"] => string(32) "52e0d25f1167c6388332f7e276dca6ea"
    ["content_type"] => string(16) "xengallery_media"
    ["upload_type"] => string(12) "image_upload"
    ["key"] => string(12) "image_upload"
    ["content_data"] => array(1) {
      ["category_id"] => string(1) "1"
    }
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(9) "json-text"
    ["_xfUploader"] => string(1) "1"
  }
}
Screen Shot 2015-09-08 at 7.13.34 PM.png

Screen Shot 2015-09-08 at 7.13.47 PM.png
 

Chris D

XenForo developer
Staff member
#2
As far as I can tell, this situation is pretty much impossible unless a user who was already in the process of uploading media was deleted. Even then, I can't totally reproduce this.

That said, I've added some additional checks in a few places which may at least make situations similar to this behave differently if they happen to crop up again.

If you still have this picture stuck in your moderation queue, you may need to delete it directly from the database.