Opened 3 years ago

Closed 3 years ago

#5011 closed change (fixed)

Change Formmail2 To Fail When Template is Not Found

Reported by: jsonesen Assignee: jsonesen
Priority: P3 Milestone:
Module: Sitescripts Keywords:
Cc: kvas, sebastian, ferris Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by kvas)


Recently during the acceptable ads committee deployment a template file was not copied into the required sitescripts dir. This caused quiet failures for form submissions on the website for a number of hours.

Currently the template is not loaded until the handler has been invoked by the multiplexer. There's no performance penalty since the templates are cached, but it also means that we don't know if the proper template file exists until it is too late (i.e. when a user tries to submit form data).

What to change

Load the template at the creation of the handler so that if the template file does not exist the website will not deploy and will raise a 'jinja2.TemplateNotFound' exception which will include the path where the template file is expected to live.

Change History (6)

comment:1 Changed 3 years ago by kvas

  • Description modified (diff)
  • Priority changed from Unknown to P3
  • Ready set

comment:2 Changed 3 years ago by jsonesen

  • Review URL(s) modified (diff)

comment:3 Changed 3 years ago by jsonesen

  • Status changed from new to reviewing

comment:4 Changed 3 years ago by jsonesen

This actually was addressed in the commit which added the logging to the formmail script. I just realized that I never updated this ticket. Apologies.

comment:5 Changed 3 years ago by kvas

Sounds good. So this can be closed then, right?

comment:6 Changed 3 years ago by jsonesen

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.