Bugzilla@Mozdev – Bug 26276
Reply template is broken in version 1.3+
Last modified: 2016-09-12 11:09:54
You need to log in before you can comment on or make changes to this bug.
Reply template is not working in version 1.3+. Under 1.2.x it works fine.
PLease provide the following info: 0. Are you replying in HTML or plain text? 1. Your Quote header 2. Your Template 3. Settings: [x] Use instead of default quote header [x] Use HTML [ ] Replace line breaks with <br> 4. Global Settings: [x] Replace SIgnature [x] Process Signature [x] Replace line breaks in plain text sig [x] Force Paragraph Mode You can use JavaScript Error console (CTRL+SHIFT+J) to see if any new errors are reported during opening the composer window.
> 0. Are you replying in HTML or plain text? Plain text. > 1. Your Quote header Hello, %from(name)%. %date% you wrote: > [x] Use instead of default quote header Checked. > [x] Use HTML I'm not using HTML messages at all. Checked for test. Same. > 4. Global Settings: > [x] Replace SIgnature > [x] Process Signature > [x] Replace line breaks in plain text sig All three checked. > [x] Force Paragraph Mode Checked. > You can use JavaScript Error console (CTRL+SHIFT+J) to see if any new errors No erros, just messages: Mon Aug 22 2016 15:00:36 GMT+0300 CH: messagePaneBoxFocus start Mon Aug 22 2016 15:00:36 GMT+0300 CH: messagePaneBoxFocus stop
(In reply to comment #2) > > 0. Are you replying in HTML or plain text? > > Plain text. > > > 1. Your Quote header > > Hello, %from(name)%. > > %date% you wrote: > For testing I am going to assume what you are doing is this: 1 - Quote Header: %date% you wrote: 2 - Template: Hello, %from(name)%. === ...because that's what each part is. quote header is basically whats _always on top_ of the quote block The Template represents your "writing area" - basically its the stationery that you write on. Whether this is before or after the quote depends on account settings > Composition and Addressing Now I tested with 2 settings "start my reply above the quote" and "start my reply below the quote" which both worked for me. When the email is created the cursor is dropped straight below the "Hello, name." What are you getting in your new email, any words at all? Only the quoted email? or just things appearing in the wrong / unexpected space? Note that the two words "Is broken" doesn't really help me to get a picture of what is happening. It could mean that composer is not loading at all, or that everything is perfect except for the name being replaced or an infinite other possible results. If you like, attach the text of a generated email replying to a simple test message _without editing it_ straight after composer shows it.
> What are you getting in your new email, any words at all? Only the quoted email? I see only quoted text in new Email window. No quote header at all. > It could mean that composer is not loading at all, or that everything is perfect except for the name being replaced or an infinite other possible results. If you like, attach the text of a generated email replying to a simple test message _without editing it_ straight after composer shows it. http://paste.fedoraproject.org/412485/18770841/
Same templates but on SmartTemplate version 1.2.1: http://paste.fedoraproject.org/412490/18771971/
I'm experiencing the same problem. When I reply in plain text mode (my default), the problem occurs. When I reply in HTML mode (with Shift + Reply button) it works. I debugged the code and found that in Reply mode you look for BLOCKQUOTE tag. This tag doesn't exist in a plain text reply message, only in HTML reply message. So I replaced the code in smartTemplate-compose.js: let firstQuote = (composeCase=='forward') ? editor.rootElement.firstChild : editor.rootElement.getElementsByTagName('BLOCKQUOTE')[0]; with: let firstQuote = (composeCase=='forward') ? editor.rootElement.firstChild : (editor.rootElement.getElementsByTagName('BLOCKQUOTE')[0] ? editor.rootElement.getElementsByTagName('BLOCKQUOTE')[0] : editor.rootElement.firstChild); and it works.
(In reply to comment #6) > I'm experiencing the same problem. When I reply in plain text mode (my > default), the problem occurs. When I reply in HTML mode (with Shift + Reply > button) it works. > > I debugged the code and found that in Reply mode you look for BLOCKQUOTE tag. > This tag doesn't exist in a plain text reply message, only in HTML reply > message. > > So I replaced the code in smartTemplate-compose.js: > let firstQuote = > (composeCase=='forward') ? > editor.rootElement.firstChild : > editor.rootElement.getElementsByTagName('BLOCKQUOTE')[0]; > > with: > let firstQuote = > (composeCase=='forward') ? > editor.rootElement.firstChild : > (editor.rootElement.getElementsByTagName('BLOCKQUOTE')[0] ? > editor.rootElement.getElementsByTagName('BLOCKQUOTE')[0] : > editor.rootElement.firstChild); > > and it works. > Thanks for doing the leg work. I am out over the weekend but will review the code when I am back home. Hope using firstchild is sufficient for all positioning cases.
(In reply to comment #7) > (In reply to comment #6) > > I'm experiencing the same problem. When I reply in plain text mode (my > > default), the problem occurs. When I reply in HTML mode (with Shift + Reply > > button) it works. > > > > I debugged the code and found that in Reply mode you look for BLOCKQUOTE tag. > > This tag doesn't exist in a plain text reply message, only in HTML reply > > message. > > > > So I replaced the code in smartTemplate-compose.js: > > let firstQuote = > > (composeCase=='forward') ? > > editor.rootElement.firstChild : > > editor.rootElement.getElementsByTagName('BLOCKQUOTE')[0]; > > > > with: > > let firstQuote = > > (composeCase=='forward') ? > > editor.rootElement.firstChild : > > (editor.rootElement.getElementsByTagName('BLOCKQUOTE')[0] ? > > editor.rootElement.getElementsByTagName('BLOCKQUOTE')[0] : > > editor.rootElement.firstChild); > > > > and it works. > > > > Thanks for doing the leg work. I am out over the weekend but will review the > code when I am back home. Hope using firstchild is sufficient for all > positioning cases. > hmm, just checked my source code it is starting from line 1004: let firstQuote = (composeCase=='forward') ? editor.rootElement.firstChild : editor.rootElement.getElementsByTagName('BLOCKQUOTE')[0]; if (!firstQuote) firstQuote = editor.rootElement.firstChild; but may be related to [Bug 26261]. Posting a patch here next
*** This bug has been marked as a duplicate of bug 26261 ***
Created an attachment (id=8232) [details] 1.3.1 prerelease 8 fallback for p[lain text case