Anonymous Login
06-18-2018 04:42 PM

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002185SMF 2.0public2008-11-25 16:35
PrioritynormalSeverityminorReproducibilityhave not tried
Summary0002185: Unable to load the 'Errors' template.
DescriptionSVN 7267

Loading http://localhost/b/index.php
After deleting my user account as a user I was redirected and got

Unable to load the 'Errors' template.

I had this occur aswell doing something else, but haven't been able to reproduce it on the other occasion.
Refreshing then loaded the page as usual.

3 errors in my error log relating this
8: Undefined index: template_dirs
File: C:/xampplite/htdocs/b/Sources/Load.php
Line: 1665

2: Invalid argument supplied for foreach()
File: C:/xampplite/htdocs/b/Sources/Load.php
Line: 1665

  Type of error: Template
Unable to load the 'Errors' template.
TagsNo tags attached.
Attached Files

duplicate of 0002760resolved[SiNaN] Deleting account exits with "no_access". 



Oldiesmann (Developer)

Does this still happen in the latest revision? $settings['template_dirs'] is defined in the loadTheme() function, which should be called prior to loadTemplate().


Grudge (SMF Friend)

So, are you saying this always happen when you delete your own account as a user?


karlbenson (SMF Friend)

sorry for the lateness of the reply.

I have managed to reproduce it by creating a new user, then immediately logging into that account and then deleting it.

"Unable to load the 'Errors' template."


winrules (SMF Friend)

Here is a backtrace of the problem:

#0 loadTemplate(Errors) called at [.\Sources\Errors.php:291]
#1 setup_fatal_error_context(You are not allowed to access this section) called at [.\Sources\Errors.php:192]
#2 fatal_lang_error(no_access) called at [.\Sources\LogInOut.php:629]
#3 validatePasswordFlood(0, , ) called at [.\Sources\Load.php:378]
#4 loadUserSettings() called at [.\index.php:166]
#5 smf_main() called at [.\index.php:151]

The template errors appear because validatePasswordFlood() throws errors before the template has been loaded. It think the problem could be solved by clearing the login session when the account is deleted, but it is probably a bigger issue how an error can be thrown before the templates are loaded.
MantisBT (Modified for SMF Intergration)[^] Copyright © 2000 - 2010 Mantis Group