Closed Bug 67993 Opened 24 years ago Closed 24 years ago

[embed]Using plain text email causes JS errors because of unnecessary commands in editor

Categories

(SeaMonkey :: MailNews: Message Display, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9

People

(Reporter: blizzard, Assigned: cmanske)

References

Details

(Keywords: embed)

Attachments

(4 files)

Build is 2001 02 07 11.  When replying to a piece of email I'm getting this as
an error ( but the reply still seems to succeed. )

failed to get command manager number 3
failed to get command manager number 2
Registering commands
Have Find = true
Have SpellChecker = false
RECEIVE CALLBACK: OnHeadersReady
replacing child in comp fields 2 recips 
Warning prev sibling is not in our list!!!set focus on the body
************************************************************
* Call to xpconnect wrapped JSObject produced this error:  *
[Exception... "Component returned failure code: 0x80004001
(NS_ERROR_NOT_IMPLEMENTED) [nsIEditorShell.GetSelectedElement]"  nsresult:
"0x80004001 (NS_ERROR_NOT_IMPLEMENTED)"  location: "JS frame ::
chrome://editor/content/editor.js :: GetObjectForProperties :: line 970"  data: no]
************************************************************
An error occurred updating the cmd_objectProperties command
Whiteboard: critical for mozilla 0.8
this is a duplicate.  over to ducarroz.

blizzard, this is plain text reply, right?  It shouldn't actually cause you any
problems.
Assignee: sspitzer → ducarroz
Yeah, this is in plain text mail.  It doesn't seem to hurt anything that I can
see but a JS error is a JS error.  If you happen to know that it isn't breaking
anything then it's not a big deal.  It would be nice to get it cleaned up for
0.8 though.  What do you think?
cc editor folks. My guess is that cmanske should get this.
Sure, I'll take this. We are probably registering the same commands for both
HTML and plain text mail. The error indicates that a HTML UI command is (trying)
to be updated.
I don't think this should be rushed into 0.8, so setting to 0.9.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9
QA Contact: esther → sheelar
Are we sure that the error isn't causing some JS code, that *needs* to be
executed, to be skipped? If it is causing code to be skipped, I think we might
need to fix this for 0.8.
I investigated thoroughly and the cause is exactly as I described: We register
the same set of commands for both HTML and plain text mail, even though commands
such as nsEditorShell::GetSelectedElement() are not implemented for plain text.
The error is not critical.
The correct solution is to register only the required commands for the plain
text editor. We are in the midst of rebuilding this as part of embedding
rearchitecture and I'll fix this aspect as part of that work (my part is
covered by bug 66300).
Assignee: ducarroz → cmanske
Status: ASSIGNED → NEW
Depends on: 66300
Keywords: embed
Summary: js error when replying to email → Using plain text email causes JS errors because of unnecessary commands in editor
Whiteboard: critical for mozilla 0.8
Status: NEW → ASSIGNED
Changing "depends" to our embed-tracking bug.
Depends on: 34477
No longer depends on: 66300
Summary: Using plain text email causes JS errors because of unnecessary commands in editor → [embed]Using plain text email causes JS errors because of unnecessary commands in editor
this is a dup of bug 63396 or rather bug 63396 is a dup of this one, since this
one is assigned and more advanced in its resolution.
*** Bug 63396 has been marked as a duplicate of this bug. ***
The essential change is rather small -- most of the lines touched in the 3/02/01
attachment is because I changed gHTMLEditorCommandManager to
gEditorCommandManager so it wouldn't be missleading.
There's also a small cleanup change at the end of editor.js patch that simply
removes the unused varible "menuList" and does null check on "paraMenuList"
passed in (this is what replaced "menuList" var.)
Whiteboard: FIX IN HAND needs r= sr=
I'd rather see GetEditorController() maintain gEditorCommandManager as opposed to 
having the caller of GetEditorController need to determine whether or not it 
should call GetEditorController.  This would cleanup SetupTextEditorCommands() as 
well as SetupHTMLEditorCommands().
reassing back to esther,
QA Contact: sheelar → esther
Why does gEditorCommandManager have to be global at all? We only ever use it 
inside of the SetupHTMLEditorCommands() function.
sr=sfraser
checked in.
Whiteboard: FIX IN HAND needs r= sr=
fixed
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
I don't see this anymore with build 2002-02-04-12, Linux (RedHat 7.2)
Using plaintext reply and the console.

Verified FIXED.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: