Closed
Bug 143604
Opened 23 years ago
Closed 23 years ago
format=html not supported
Categories
(Bugzilla :: Bugzilla-General, defect, P3)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.18
People
(Reporter: bbaetz, Assigned: myk)
References
()
Details
Since our files aren't called foo-html.html.tmpl, a format of 'html' fails,
giving the error:
"The html output format is not supported by this script. Supported formats
(besides the default HTML format) are simple, rdf."
This error is silly, as we do. If html really is the default, then we should
check for html earlier.
Comment 1•23 years ago
|
||
This error is correct, but misleading. When it says "the default HTML format" it
should really say "the DEFAULT (html) format", if you see what I mean.
In other words, the point is that it's default, not that it's HTML - the default
format isn't always HTML - or rather, it shouldn't be. That's the problem. I'm
probably having difficulty explaining this coherently because it's 20 to 1 in
the morning...
Gerv
Reporter | ||
Comment 2•23 years ago
|
||
Yes, but my point is that if the default format is html, then format=html should
produce html. If the default was foobar, then format=foobar should produce foobar.
I will, however, point out that globals.pl does assume that the default format
is html, with the different style names:
# If the format name is undefined or the default format is specified,
# do not do any validation but instead return the default format.
if (!defined($format) || $format eq "default") {
return
{
'template' => "$script.html.tmpl" ,
'extension' => "html" ,
'contenttype' => "text/html" ,
};
}
Assignee | ||
Comment 3•23 years ago
|
||
The default format (for all templates implemented with multiple formats) is not
"html"; it is unnamed. "foo.html.tmpl" does not implement the "html" format, it
implements an unnamed default format whose content is of the "text/html" type.
Nevertheless, it is true that not naming our default formats causes problems.
In particular, it forces us to make filename changes when changing the default
format for a given script, which is likely to happen as we redesign pages in the
future while keeping older versions of those pages around, as well as when
multiple equivalent formats exist for installations to choose from.
I recommend you morph this bug into "default formats are nameless".
Reporter | ||
Comment 4•23 years ago
|
||
The error message is ambiguous, then, though.
Besides, if I ask for a format of html, then I should get it. The fact that this
format happens to be the default one is irrelevent. I want html, we have html,
so....
Assignee | ||
Comment 5•23 years ago
|
||
>The error message is ambiguous, then, though.
Agreed. The error message should explain the difference between format name and
content type (but see my suggestion below).
>Besides, if I ask for a format of html, then I should get it.
Not if it doesn't exist, but a case could be made that if a format with the
given name doesn't exist, but at least one format exists whose file extension
matches the given name, then one of those formats (not sure how to pick which
one) should be used. I think this is maybe what you are asking for.
> The fact that this
>format happens to be the default one is irrelevent.
Agreed, and the solution to that is to name all formats, even the default one,
so users can request default formats by name.
This bug, as currently defined, is "worksforme", so it should be morphed into
one of these other bugs (I recommend the third as the bug closest to what you want):
"Format not found" error message does not adequately explain difference between
format and content type
Default formats are unnamed
Format-determining code should fall back on file extension when no format with
given name is found
Comment 6•23 years ago
|
||
Isn't empty string a valid name?
Priority: -- → P3
Target Milestone: --- → Bugzilla 2.18
Assignee | ||
Comment 7•23 years ago
|
||
>Isn't empty string a valid name?
Not in any naming scheme I've ever heard of.
Comment 8•23 years ago
|
||
> Agreed, and the solution to that is to name all formats, even the default one,
> so users can request default formats by name.
I'd rather not do this - it would make all our template names 5 chars longer,
and some of them are already verbose. Also, we'd have a lot of templates called
sometemplate-html.html.tmpl , and while we know this isn't redundant, it does
look it.
I prefer the other solution: if someone asks for "format=foo", and we have no
sometemplate-foo.contenttype.tmpl, then we try sometemplate.foo.tmpl before
giving up.
Gerv
Assignee | ||
Comment 9•23 years ago
|
||
Take a look at bug 146945. Not only does it remove the redundancy, it resolves
the format/content-type ambiguity and provides the requested format name -> file
extension gracefulness.
Comment 10•23 years ago
|
||
Fixed by bug 146945 - after the split of formats and ctypes, ctype=html now does
a no-op.
Gerv
Comment 11•23 years ago
|
||
So it's fixed, then :-)
Gerv
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•