Xenforo return blank screen/page on every page


New member
writing here with the hope someone can give suggestions on this issue and hopefully we resolve this.
Xenforo forum start suddenly gives blank white screen on every one page and status 200 ok.
White screen, no errors, we can't even debug, because when set the debug option to true in the config file nothing happens.
The DB connection seems to be fine because if we change the password to some wrong password, it gives error.
Therefore the connection to the DB is okay.
Any idea would be appreciated.


Your site url favicon showing wordpress. Have you tried to enable the debug mode from config.php and check if any errors are generating ? As currently admin.php is not accessible on your installation directory.

Any recent custom plugin installation ?


New member
enabling debug in config.php doesn't show anything different. no errors are generated. Nothing recently installed, no recent access or edits in Xenforo admin panel.Everything is so wierd.


Well-known member
Did you check if internal_data/code-cache does exist and is readable by PHP?
Did you check if there is anything in table xf_error_log?
Did you try to recompile the templates?
Do you get any output when enabling debug mode and accessing https://www.4wdtalk.com/forum-prod/index.php?_debug=1?


Well-known member
You're not able to connect to your database. Check your password, path to database, database name, authroized database users, database user permissions, etc.:

An exception occurred: [XF\Db\Exception] Access denied for user ''@'localhost' (using password: NO) in src/XF/Db/Mysqli/Adapter.php on line 165

[B]XF\Db\Mysqli\Adapter->makeConnection()[/B] in [B]src/XF/Db/Mysqli/Adapter.php[/B] at line [B]28
XF\Db\Mysqli\Adapter->getConnection()[/B] in [B]src/XF/Db/AbstractAdapter.php[/B] at line [B]60
XF\Db\AbstractAdapter->connect()[/B] in [B]src/XF/Db/Mysqli/Adapter.php[/B] at line [B]113
XF\Db\Mysqli\Adapter->escapeString()[/B] in [B]src/XF/Db/AbstractAdapter.php[/B] at line [B]516
XF\Db\AbstractAdapter->quote()[/B] in [B]src/XF/Db/AbstractAdapter.php[/B] at line [B]494
XF\Db\AbstractAdapter->quote()[/B] in [B]src/XF/DataRegistry.php[/B] at line [B]138
XF\DataRegistry->readFromDb()[/B] in [B]src/XF/DataRegistry.php[/B] at line [B]83   
XF\DataRegistry->get()[/B] in [B]src/XF/DataRegistry.php[/B] at line [B]226
XF\DataRegistry->offsetGet()[/B] in [B]src/XF/App.php[/B] at line [B]1753   
XF\App->XF\{closure}()[/B] in [B]src/XF/Container.php[/B] at line [B]28
XF\Container->offsetGet()[/B] in [B]src/XF/App.php[/B] at line [B]2280
XF\App->setupAddOnComposerAutoload()[/B] in [B]src/XF/App.php[/B] at line [B]1852   
XF\App->setup()[/B] in [B]src/XF/Pub/App.php[/B] at line [B]91
XF\Pub\App->setup()[/B] in [B]src/XF.php[/B] at line [B]461
XF::setupApp()[/B] in [B]src/XF.php[/B] at line [B]484
XF::runApp()[/B] in [B]index.php[/B] at line [B]21[/B]


New member
NO output after https://www.4wdtalk.com/forum-prod/index.php?_debug=1
code-cache exist and is writable,
we have not yet recompile the templates,
xf_error_log shows this:
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/var/www/html/w...', 664, Array)
#1 src/XF/Template/Templater.php(664): trigger_error('Template public...', 512)
#2 src/XF/Template/Templater.php(1593): XF\Template\Templater->getTemplateData('public', 'PAGE_CONTAINER')
#3 src/XF/Pub/App.php(562): XF\Template\Templater->renderTemplate('PAGE_CONTAINER', Array)
#4 src/XF/App.php(2105): XF\Pub\App->renderPageHtml('', Array, Object(XF\Mvc\Reply\View), Object(XF\Mvc\Renderer\Html))
#5 src/XF/Mvc/Dispatcher.php(402): XF\App->renderPage('', Object(XF\Mvc\Reply\View), Object(XF\Mvc\Renderer\Html))
#6 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#7 src/XF/App.php(2300): XF\Mvc\Dispatcher->run()
#8 src/XF.php(488): XF\App->run()
#9 index.php(20): XF::runApp('XF\\Pub\\App')
#10 {main}


New member
If we change the password to something wrong, then we got error connecting to mysql, so i guess then we are able to connect to the database, true?


Well-known member
  • The error I quoted says you can't connect to the database.
  • If you haven't yet recompiled or merged the templates, do that.
  • Check for the existence of .htaccess or errors in .htaccess. Post the contents here if you have one.
  • Do NOT use notepad to edit .htaccess. Use Notepad ++ in UNIX mode or the built-in editor from the cPanel File Manager.


New member
We did a rebuild and now we're able to access the admin panel only, we got this:
  • ErrorException: Template error: [E_USER_WARNING] Template public:pAGE_CONTAINER is unknown
  • src/XF/Template/Templater.php:664
  • ErrorException: Template error: [E_USER_WARNING] Template public:forum_list is unknown
  • src/XF/Template/Templater.php:664
we are on Nginx, so .htaccess doesn work here


XenForo moderator
Staff member
Can you check for the presence of the /src/addons/XF/_data/templates.xml file on the server.

If it's not there then try uploading it again from the archive.

If it uploads but is missing again after a refresh then a security mechanism on the server is deleting files.
Your host will have to resolve that.


New member
We seems to fix this by rebuilding the Xenforo, but now all the Custom avatars are missing. We have a propper permissions to DATA folder and INTERNAL_DATA