Advertisement:

View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002185SMF 2.0public2008-06-06 19:372008-11-25 16:35
Reporterkarlbenson 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformOSOS Version
Summary0002185: Unable to load the 'Errors' template.
DescriptionSVN 7267
Mysql.

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
http://localhost/b/index.php? [^]
8: Undefined index: template_dirs
File: C:/xampplite/htdocs/b/Sources/Load.php
Line: 1665

http://localhost/b/index.php? [^]
2: Invalid argument supplied for foreach()
File: C:/xampplite/htdocs/b/Sources/Load.php
Line: 1665

  Type of error: Template
 http://localhost/b/index.php? [^]
Unable to load the 'Errors' template.
TagsNo tags attached.
Attached Files

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

-  Notes
(0004973)
Oldiesmann (Developer)
2008-06-14 22:32

Does this still happen in the latest revision? $settings['template_dirs'] is defined in the loadTheme() function, which should be called prior to loadTemplate().
(0004980)
Grudge (SMF Friend)
2008-06-16 14:40

So, are you saying this always happen when you delete your own account as a user?
(0005020)
karlbenson (SMF Friend)
2008-06-22 12:04

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."
(0005030)
winrules (SMF Friend)
2008-06-24 20:53

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 1.2.8 (Modified)[^] Copyright © 2000 - 2010 Mantis Group