Add a hook into user-error.html.tmpl to allow user-extendable error messages

RESOLVED FIXED in Bugzilla 2.20

Status

()

P2
enhancement
RESOLVED FIXED
14 years ago
14 years ago

People

(Reporter: dennis.melentyev, Assigned: dennis.melentyev)

Tracking

2.19.3
Bugzilla 2.20
Bug Flags:
approval +

Details

Attachments

(1 attachment, 4 obsolete attachments)

(Assignee)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050217
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050217

Need a Hook.process("blah-blah") in user-error.html.tmpl to allow my extension
to add extension-specific error messages for ThrowUserError()

Reproducible: Always

Steps to Reproduce:
not appropriate

Updated

14 years ago
Severity: minor → enhancement
Summary: Request for adding a hook into user-errors.html.tpml to allow user-extendable error messages → Add a hook into user-errors.html.tpml to allow user-extendable error messages
Version: unspecified → 2.19.3
(Assignee)

Comment 1

14 years ago
Created attachment 185012 [details] [diff] [review]
Desired changes for template
(Assignee)

Updated

14 years ago
Summary: Add a hook into user-errors.html.tpml to allow user-extendable error messages → Add a hook into user-error.html.tpml to allow user-extendable error messages
(Assignee)

Updated

14 years ago
Summary: Add a hook into user-error.html.tpml to allow user-extendable error messages → Add a hook into user-error.html.tmpl to allow user-extendable error messages

Updated

14 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P2
Target Milestone: --- → Bugzilla 2.20
(Assignee)

Comment 2

14 years ago
Created attachment 185161 [details] [diff] [review]
revised version

This patch pretend to be a complete bug fix. Previous one does had flaws, since
titles are preset to "Error" if not defined elsewhere.
Also, documentation part added.
Attachment #185012 - Attachment is obsolete: true
(Assignee)

Updated

14 years ago
Assignee: myk → dennis.melentyev
(Assignee)

Updated

14 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 3

14 years ago
Created attachment 185165 [details] [diff] [review]
Simplified and polished version

Seems to be the best solution
Attachment #185161 - Attachment is obsolete: true
Attachment #185165 - Flags: review?(myk)

Comment 4

14 years ago
Comment on attachment 185165 [details] [diff] [review]
Simplified and polished version

Almost right.  However, this fails runtests.  You need to either add a FILTER
none to the [% error_message %] or add it to filterexceptions.	I prefer FILTER
none
Attachment #185165 - Flags: review?(myk) → review-
(Assignee)

Comment 5

14 years ago
Created attachment 185249 [details] [diff] [review]
same as above, with "FILTER none" added

FILTER none added. Last minute changes are evil :(
Attachment #185165 - Attachment is obsolete: true
Attachment #185249 - Flags: review?(bugreport)
(Assignee)

Comment 6

14 years ago
Created attachment 185252 [details] [diff] [review]
Agrhh... "none", not "html"
Attachment #185249 - Attachment is obsolete: true
Attachment #185252 - Flags: review?(bugreport)
(Assignee)

Updated

14 years ago
Attachment #185249 - Flags: review?(bugreport)

Comment 7

14 years ago
Comment on attachment 185252 [details] [diff] [review]
Agrhh... "none", not "html"


>+  # via hooks: just place your <extension>-errors.html.tmpl into 
>+  # templates/en/extension/hook/global/user-error.html.tmpl/errors/

"template" not "templates" -- can be fixed on checkin.
Attachment #185252 - Flags: review?(bugreport) → review+

Updated

14 years ago
Flags: approval?
Approved for checkin to tree during 2.20 freeze.
Flags: approval? → approval+

Comment 9

14 years ago
Checking in template/en/default/global/user-error.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/global/user-error.html.tmpl,v
 <--  user-error.html.tmpl
new revision: 1.110; previous revision: 1.109
done
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.