XF 2.3 Server errors - which add-on is causing them?

Levina

Active member
I am suddenly getting pages of server errors. Am I correct that this is caused by Bob's UBS (blogging) add-on? I'm not sure because Ozzy's (or rather Painbaker's) EXIF add-on is also mentioned. So not sure whom to contact.

Here's the error:

Error: Call to a member function canUploadAndManageCommentAttachments() on null . src/addons/XenAddons/UBS/Attachment/Comment.php:33
Generated by: Unknown account . 21 December 2025 at 12:06

Stack trace​

#0 src/XF/Pub/Controller/AttachmentController.php(62): XenAddons\UBS\Attachment\Comment->canManageAttachments(Array, NULL)
#1 src/XF/Mvc/Dispatcher.php(362): XF\Pub\Controller\AttachmentController->actionUpload(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Attachment', 'Upload', Object(XF\Mvc\RouteMatch), Object(OzzModz\AttachmentExifData\XF\Pub\Controller\Attachment), NULL)
#3 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(OzzModz\AttachmentExifData\XF\Pub\Controller\Attachment), NULL)
#4 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#5 src/XF/App.php(2824): XF\Mvc\Dispatcher->run()
#6 src/XF.php(806): XF\App->run()
#7 index.php(23): XF::runApp('XF\\Pub\\App')
#8 {main}

Request state​

array(4) {
["url"] => string(107) "/attachments/upload?context[category_id]=%40%40E7B4Y&hash=fce9b90e5bb0b6ab0f36ce4d10b02992&type=ubs_comment"
["referrer"] => string(33) "https://focus-on-photography.net/"
["_GET"] => array(4) {
["/attachments/upload"] => string(0) ""
["context"] => array(1) {
["category_id"] => string(7) "@@E7B4Y"
}
["hash"] => string(32) "fce9b90e5bb0b6ab0f36ce4d10b02992"
["type"] => string(11) "ubs_comment"
}
["_POST"] => array(1) {
["_xfToken"] => string(8) "********"
}
}
 
Solution
I am suddenly getting pages of server errors. Am I correct that this is caused by Bob's UBS (blogging) add-on? I'm not sure because Ozzy's (or rather Painbaker's) EXIF add-on is also mentioned. So not sure whom to contact.

Here's the error:

Error: Call to a member function canUploadAndManageCommentAttachments() on null . src/addons/XenAddons/UBS/Attachment/Comment.php:33
Generated by: Unknown account . 21 December 2025 at 12:06

Stack trace​

#0 src/XF/Pub/Controller/AttachmentController.php(62): XenAddons\UBS\Attachment\Comment->canManageAttachments(Array, NULL)
#1 src/XF/Mvc/Dispatcher.php(362): XF\Pub\Controller\AttachmentController->actionUpload(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(264)...
I am suddenly getting pages of server errors. Am I correct that this is caused by Bob's UBS (blogging) add-on? I'm not sure because Ozzy's (or rather Painbaker's) EXIF add-on is also mentioned. So not sure whom to contact.

Here's the error:

Error: Call to a member function canUploadAndManageCommentAttachments() on null . src/addons/XenAddons/UBS/Attachment/Comment.php:33
Generated by: Unknown account . 21 December 2025 at 12:06

Stack trace​

#0 src/XF/Pub/Controller/AttachmentController.php(62): XenAddons\UBS\Attachment\Comment->canManageAttachments(Array, NULL)
#1 src/XF/Mvc/Dispatcher.php(362): XF\Pub\Controller\AttachmentController->actionUpload(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Attachment', 'Upload', Object(XF\Mvc\RouteMatch), Object(OzzModz\AttachmentExifData\XF\Pub\Controller\Attachment), NULL)
#3 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(OzzModz\AttachmentExifData\XF\Pub\Controller\Attachment), NULL)
#4 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#5 src/XF/App.php(2824): XF\Mvc\Dispatcher->run()
#6 src/XF.php(806): XF\App->run()
#7 index.php(23): XF::runApp('XF\\Pub\\App')
#8 {main}

Request state​

array(4) {
["url"] => string(107) "/attachments/upload?context[category_id]=%40%40E7B4Y&hash=fce9b90e5bb0b6ab0f36ce4d10b02992&type=ubs_comment"
["referrer"] => string(33) "https://focus-on-photography.net/"
["_GET"] => array(4) {
["/attachments/upload"] => string(0) ""
["context"] => array(1) {
["category_id"] => string(7) "@@E7B4Y"
}
["hash"] => string(32) "fce9b90e5bb0b6ab0f36ce4d10b02992"
["type"] => string(11) "ubs_comment"
}
["_POST"] => array(1) {
["_xfToken"] => string(8) "********"
}
}
Yes, this is Bob's UBS (Ultimate Blog System) addon. The EXIF addon only appears in the stack trace because it extends XenForo's attachment controller class - it's not the source of the problem.

The error originates directly in XenAddons\UBS\Attachment\Comment.php:33 when handling a ubs_comment attachment type.

What's happening:

The category_id being passed is @@E7B4Y - that's clearly not a valid category ID. It looks like garbage/placeholder data. The UBS addon tries to look up this category, fails (returns null), and then crashes when trying to call canUploadAndManageCommentAttachments() on that null value.

Likely cause:

This is probably a spam bot or crawler hitting your attachment upload endpoint with malformed data. The referrer being just your root domain (https://focus-on-photography.net/) rather than an actual blog entry page supports this - a legitimate user would be coming from an actual UBS comment form.
 
Solution
Yes, this is Bob's UBS (Ultimate Blog System) addon. The EXIF addon only appears in the stack trace because it extends XenForo's attachment controller class - it's not the source of the problem.

The error originates directly in XenAddons\UBS\Attachment\Comment.php:33 when handling a ubs_comment attachment type.

What's happening:

The category_id being passed is @@E7B4Y - that's clearly not a valid category ID. It looks like garbage/placeholder data. The UBS addon tries to look up this category, fails (returns null), and then crashes when trying to call canUploadAndManageCommentAttachments() on that null value.

Likely cause:

This is probably a spam bot or crawler hitting your attachment upload endpoint with malformed data. The referrer being just your root domain (https://focus-on-photography.net/) rather than an actual blog entry page supports this - a legitimate user would be coming from an actual UBS comment form.
That makes a lot of sense because when I got the server errors I looked at the activity in Blogs and there wasn't any. No new comments e.g. But I did have a bot swarm in the house and the server errors all took place within a time frame of just over 30 minutes and then stopped. So I'm just going to assume you are right and not bother any add-on dev with this.

Thank you very much for explaining it to me.
 
I'm coming back to this because I have been having the same server error again on and off for the last 24 hours but this time the referrer is different and so is the category id. Here's the log:

Code:
    Error: Call to a member function canUploadAndManageCommentAttachments() on null src/addons/XenAddons/UBS/Attachment/Comment.php:33

    Generated by: Unknown account 29 December 2025 at 22:47

Stack trace

#0 src/XF/Pub/Controller/AttachmentController.php(62): XenAddons\UBS\Attachment\Comment->canManageAttachments(Array, NULL)
#1 src/XF/Mvc/Dispatcher.php(362): XF\Pub\Controller\AttachmentController->actionUpload(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Attachment', 'Upload', Object(XF\Mvc\RouteMatch), Object(OzzModz\AttachmentExifData\XF\Pub\Controller\Attachment), NULL)
#3 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(OzzModz\AttachmentExifData\XF\Pub\Controller\Attachment), NULL)
#4 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#5 src/XF/App.php(2824): XF\Mvc\Dispatcher->run()
#6 src/XF.php(806): XF\App->run()
#7 index.php(23): XF::runApp('XF\\Pub\\App')
#8 {main}

Request state

array(4) {
  ["url"] => string(101) "/attachments/upload?context%5Bcategory_id%5D=2&hash=e23059c7dca17c65dc2f9dd306957a74&type=ubs_comment"
  ["referrer"] => bool(false)
  ["_GET"] => array(4) {
    ["/attachments/upload"] => string(0) ""
    ["context"] => array(1) {
      ["category_id"] => string(1) "2"
    }
    ["hash"] => string(32) "e23059c7dca17c65dc2f9dd306957a74"
    ["type"] => string(11) "ubs_comment"
  }
  ["_POST"] => array(0) {
  }
}
 
I'm coming back to this because I have been having the same server error again on and off for the last 24 hours but this time the referrer is different and so is the category id. Here's the log:

Code:
    Error: Call to a member function canUploadAndManageCommentAttachments() on null src/addons/XenAddons/UBS/Attachment/Comment.php:33

    Generated by: Unknown account 29 December 2025 at 22:47

Stack trace

#0 src/XF/Pub/Controller/AttachmentController.php(62): XenAddons\UBS\Attachment\Comment->canManageAttachments(Array, NULL)
#1 src/XF/Mvc/Dispatcher.php(362): XF\Pub\Controller\AttachmentController->actionUpload(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Attachment', 'Upload', Object(XF\Mvc\RouteMatch), Object(OzzModz\AttachmentExifData\XF\Pub\Controller\Attachment), NULL)
#3 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(OzzModz\AttachmentExifData\XF\Pub\Controller\Attachment), NULL)
#4 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#5 src/XF/App.php(2824): XF\Mvc\Dispatcher->run()
#6 src/XF.php(806): XF\App->run()
#7 index.php(23): XF::runApp('XF\\Pub\\App')
#8 {main}

Request state

array(4) {
  ["url"] => string(101) "/attachments/upload?context%5Bcategory_id%5D=2&hash=e23059c7dca17c65dc2f9dd306957a74&type=ubs_comment"
  ["referrer"] => bool(false)
  ["_GET"] => array(4) {
    ["/attachments/upload"] => string(0) ""
    ["context"] => array(1) {
      ["category_id"] => string(1) "2"
    }
    ["hash"] => string(32) "e23059c7dca17c65dc2f9dd306957a74"
    ["type"] => string(11) "ubs_comment"
  }
  ["_POST"] => array(0) {
  }
}
I would reach out to @Bob to have him fix this.

Root cause: This appears to be a spam bot or malformed request attempting to upload attachments to a UBS comment without providing the required article context. The request has no referrer (bool(false)) and was generated by an "Unknown account", which are typical indicators of bot activity.

The fix should be in the canManageAttachments() method of src/addons/XenAddons/UBS/Attachment/Comment.php - it needs a null check before calling the method.
 
I would reach out to @Bob to have him fix this.

Root cause: This appears to be a spam bot or malformed request attempting to upload attachments to a UBS comment without providing the required article context. The request has no referrer (bool(false)) and was generated by an "Unknown account", which are typical indicators of bot activity.

The fix should be in the canManageAttachments() method of src/addons/XenAddons/UBS/Attachment/Comment.php - it needs a null check before calling the method.
That's what I thought too, after what you said last time. I'm going to contact Bob about it. Thank you very much!
 
Back
Top Bottom