-
-
Notifications
You must be signed in to change notification settings - Fork 109
Closed
Labels
Milestone
Description
Using <txp:output_form>
in an error_*
page/form doesn't render the form because it doesn't know which theme is in use. Under error conditions (e.g. wrong URL) there is no concept of a 'section' - the mechanism by which the theme pages and styles are determined.
Under normal conditions, the fetch_form()
function tries to use the current URL theme (if it's known) but has no further logic than that. It will fail unceremoniously if it can't resolve the theme.
Possible revised workflow:
- Look up the 'power user logged in' theme first and use that if it's in use, as an override to...
- ... using the theme as determined by the URL section (
$pretext
) as it does now. - Failing that, if the form name is unique (i.e. only in use by one theme, not
default
or some name that features in more than one theme) then use that. Safe enough to do so. - Add a
theme
attribute to the tag, which overrides all the above and permits forms from other themes to be used at any time.
Does all of that sound reasonable? Any pitfalls? Better ideas?