XF 2.3 I keep getting this error message

Lucandi

Active member
  • ErrorException: Template error: [E_WARNING] Trying to access array offset on null
  • internal_data/code_cache/templates/l1/s0/admin/PAGE_CONTAINER.php:219
 
What's your current PHP version? Full XF version, 2.3.#?

You didn't post the full stack trace with the error, so could be a PHP compatibility issue, or something else.
 
What's your current PHP version? Full XF version, 2.3.#?

You didn't post the full stack trace with the error, so could be a PHP compatibility issue, or something else.
I am having a similar issue.
Can you help?


Server error log
  • ErrorException: Template error: [E_WARNING] Trying to access array offset on null
  • internal_data/code_cache/templates/l1/s0/admin/helper_user_search_criteria.php:496
  • Generated by: andrew
  • May 8, 2025 at 4:32 PM

Stack trace​

#0 internal_data/code_cache/templates/l1/s0/admin/helper_user_search_criteria.php(496): XF\Template\Templater->handleTemplateError(2, '[E_WARNING] Try...', '/home/barkerh/p...', 496)
#1 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, NULL)
#2 src/XF/Template/Templater.php(1680): XF\Template\Templater->renderTemplate('helper_user_sea...', Array)
#3 internal_data/code_cache/templates/l1/s0/admin/user_search.php(52): XF\Template\Templater->includeTemplate('admin:helper_us...', Array)
#4 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, NULL)
#5 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('user_search', Array)
#6 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#7 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:User\\Search', 'admin:user_sear...', Array)
#8 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#9 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#10 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#11 src/XF/App.php(2351): XF\Mvc\Dispatcher->run()
#12 src/XF.php(517): XF\App->run()
#13 admin.php(15): XF::runApp('XF\\Admin\\App')
#14 {main}

Request state​

array(4) {
["url"] => string(38) "/fiveacresforum/admin.php?users/search"
["referrer"] => string(71) "https://www.barkerhill.com/fiveacresforum/admin.php?logs/server-errors/"
["_GET"] => array(1) {
["users/search"] => string(0) ""
}
["_POST"] => array(0) {
}
}
Delete
 
I am having a similar issue.
Can you help?
Same question as above, could you share your actual XF version currently in use and the supporting PHP version? (you can see the current PHP version on your ACP front page)

This error is commonly associated with using a version of PHP that isn't fully compatible with whatever version of XF you are running.
 
But I am running XF 2.3.6. So what should I do? Go to a lower version of PHP? Or?
The link you posted isn't XF 2.3.6 btw. It's XF 2.2.8.

Your copyright year is outdated:
Community platform by XenForo® © 2010-2021 XenForo Ltd.

If you were running 2.3.6, it would be 2025 instead of 2021.
 
  • Like
Reactions: ENF
The link you posted isn't XF 2.3.6 btw. It's XF 2.2.8.

Your copyright year is outdated:
Community platform by XenForo® © 2010-2021 XenForo Ltd.

If you were running 2.3.6, it would be 2025 instead of 2021.

I uploaded from the latest one in xenforo's download area, 2.3.6. So what went wrong? Did I mis-read the version? Perhaps I did, but ?
 
But I am running XF 2.3.6. So what should I do? Go to a lower version of PHP? Or?
As Jeremy said, this error could really only come from a 2.2.x version not 2.3.6.
In your admin control panel, scroll down to the bottom of the page and look in the lower right corner double-check what version is active.

Example:
1746796352226.webp

Also, the site you reported the error from has an out of date Copyright date stamp. That's also and indication of an older version of XF.

Example (2.3.6)
1746796450208.webp

If you are indeed running a 2.2.x version, you need to back the PHP down to 8.2 or possible 8.1 depending on the exact version.
 
ENF, ok, I checked, and you are right. Community platform by XenForo® v2.2.8 . I have no clue of how it happened. What should I do? Can I go back to an earlier PHP?
Whoever you hosting with, you may have a control panel to do this or ask their support.
If you can upgrade to a later version of 2.2, like 2.2.17, it will solve this problem. Or, just go to 2.3.6 if it's doable.
I'd actually work on upgrading XF first, you're far behind with updates being on 2.2.8 which was released on Dec 3, 2021
 
I wonder why the version still says 2.2.8 because I did do the upgrade for 2.3.6. This is why I earlier said I was running 2.3.6. I already uploaded all the files and went through the install. Apparently, something did not go right. If I do an upgrade to 2.2.17, which probably makes sense, is that advisable? The system thinks we are running 2.2.8, but we copied the files from 2.3.6 download?
 
I wonder why the version still says 2.2.8 because I did do the upgrade for 2.3.6. This is why I earlier said I was running 2.3.6. I already uploaded all the files and went through the install. Apparently, something did not go right. If I do an upgrade to 2.2.17, which probably makes sense, is that advisable? The system thinks we are running 2.2.8, but we copied the files from 2.3.6 download?
I'm guessing you uploaded the files to the root instead of your sub directory (/fiveacresforum/)
 
I'm guessing you uploaded the files to the root instead of your sub directory (/fiveacresforum/)
I made a mess of it.....somehow I uploaded to a subroot, subroot. Like to fiveacresforum/styles/styles... Using filezilla, I must have gotten confused. The solution was to restore sources from backup. I've lost confidence in myself to do upgrades. Maybe I will pay someone to do it for us next time.
 
Back
Top Bottom