Ensure template renderer is available before storage handler (#13982)
`ctx.Error` requires that templates are available for this to render the error page otherwise there will be a panic at this time. This was fixed in #13164 but was not completely backported. Fix #13971 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
8e8e8ee150
commit
d2b308ae35
1 changed files with 2 additions and 1 deletions
|
@ -223,10 +223,11 @@ func NewMacaron() *macaron.Macaron {
|
|||
},
|
||||
))
|
||||
|
||||
m.Use(templates.HTMLRenderer())
|
||||
|
||||
m.Use(storageHandler(setting.Avatar.Storage, "avatars", storage.Avatars))
|
||||
m.Use(storageHandler(setting.RepoAvatar.Storage, "repo-avatars", storage.RepoAvatars))
|
||||
|
||||
m.Use(templates.HTMLRenderer())
|
||||
mailer.InitMailRender(templates.Mailer())
|
||||
|
||||
localeNames, err := options.Dir("locale")
|
||||
|
|
Reference in a new issue