To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

Ticket #496 (closed defect: wontfix)

Opened 19 months ago

Last modified 13 months ago

Behave reasonably when the template no longer exists

Reported by: tboutell Owned by: tboutell
Priority: minor Milestone: 1.5
Component: apostrophePlugin Version: trunk
Keywords: stability, 1.5rc2 Cc: johnnyoffline, agilbert, geoffd, dordille
Symfony version: 1.4

Description

If the template no longer exists we should gracefully default to the default template. We could flag this visually for those with editing privileges. This is not a crushing priority but it would help solve a problem seen today on a client site without the need for database level fixes. It could be fixed in 1.4.x, but it's not a bug, so let's defer it (and the bugs in the fix for it) to 1.5.

Change History

Changed 14 months ago by geoffd

  • keywords stability, 1.5rc2 added; stability removed

Changed 13 months ago by tboutell

  • status changed from new to accepted

I get the importance of this. Unfortunately Symfony has no hasPartial/hasTemplate calls.

There are two workarounds: (1) creating our own view subclass that catches the exception and does some fancy stuff, which locks you in to our view subclass and doesn't let you have your own due to single inheritance, or (2) writing our own hasTemplate call, which could miss stuff and would also conflict with the use of alternate view subclasses. Both of these options seem pretty lame.

I am looking into it, but there is going to be *something* we don't do in 1.5, and this is sure looking like a loser.

Changed 13 months ago by tboutell

  • status changed from accepted to closed
  • resolution set to wontfix

* This problem can only be introduced by a designer/developer (someone who can remove a template)
* This problem can also be easily fixed by anyone with that skillset (add the template back, or change the template setting in the db for any offending pages)
* The existing error message (in dev) makes perfect sense to anyone with that skillset
* On some of our client sites (FM) bad security things happen if the wrong template is used (granted it's a hack to do anything security-related in a template, but it's our hack) - so defaulting to the default template would actually be uncool

So it doesn't make sense to put time into making it more user friendly.

Note: See TracTickets for help on using tickets.