Closed Bug 1055027 Opened 10 years ago Closed 10 years ago

mailnews.reply_header_ondate not accepting preference setting

Categories

(Thunderbird :: Untriaged, defect)

31 Branch
x86
Windows Vista
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: anjeyelf, Unassigned)

Details

(Whiteboard: [needs followup bug for documenting recent changes to reply header prefs])

User Agent: Mozilla/5.0 (Windows NT 6.0; rv:31.0) Gecko/20100101 Firefox/31.0 (Beta/Release)
Build ID: 20140716183446

Steps to reproduce:

Windows vista OS
TB version 31.0
Edited prefs.js file
user_pref("mailnews.reply_header_ondate", "_____________________________________________________________________________\n\n\nOn %s");


Thunderbird Account Setting > Composition & Addressing:
Selected: 'Automatically quote the original message when relying'
Selected: ' Then Start my reply above the quote'
Selected: and place my signature 'below my reply (above the quote)



Actual results:

In version 24.6
in a Reply email.
This inserted a horizontal line after the signature but before the section:
On Date, name of person wrote:


Expected results:

In version 31.0
The horizonatl line is not shown at all.
All other date etc info is correct.

I expected the same as version 24.6, a horizontal line.


I reinstalled version 24.6 to check and all worked ok.
updated again and horizontal line is now not inserted.

safe mode has no effect.
Anje,

1) do you have mailnews.reply_header_type set to 2?
2) do have "\n" as part of the literal string?
3) if yes, did that ever create a newline for you? (doesn't for me, just see "\n" as literal text)
4) The line made up by underscores _______________ shows up alright for me on Win XP, TB31

I used about:config to edit the pref from config editor, did not edit the pref file directly
1) do you have mailnews.reply_header_type set to 2?
Yes

2) do have "\n" as part of the literal string?
Yes.
I followed instructions as per this link:
http://kb.mozillazine.org/Reply_header_settings
quote "...use the Config editor (Tools -> Options -> Advanced -> General) to see and modify these settings. However, it doesn't let you enter a line break. If you need one directly edit user.js instead, adding \n as needed. "

3) if yes, did that ever create a newline for you? (doesn't for me, just see "\n" as literal text)
In version 24.6, and prior version this worked as expected.
If I reinstall version 24.6 then it works.
It stopped when updated to version 31.0

I made the original editing via the prefs.js file directly.
the __________ line is made using underscore.

user_pref("mailnews.reply_header_ondate", "____________________________________________________________________\n\n\nOn %s");

however, this is displayed in the Config Editor as:
mailnews.reply_header_ondate;___________________________________________________________________On %s
Although it says 'If you need one directly edit user.js instead,'
There is no user.js file, so i presumed they meant prefs.js and maybe the website page had not been updated to reflect this.
re :3) if yes, did that ever create a newline for you? (doesn't for me, just see "\n" as literal text)
If I used the Config Editor and put the \n in the prefernce name:

user_pref("mailnews.reply_header_ondate", 
then i saw the \n as literal text.

hence why I made the alteration in the prefs.js file.
I use Reply above quoted message and place signature below message but above quote.

Below the signature there would be a couple of empty lines
Then the preference for mailnews.reply_header_ondate setting would place a horizontal line
then leave a few lines as empty
then I would see the line example:
On 01-01-2007 11:00 AM, Alf Aardvark wrote: 

this looked more professional and made it easier to differentiate like a type of visual delimiter.
Anje, first of all, a big thank you for your long-term valuable contributions to user support and bugs, you've been around for a long time and always active and cooperative. :)

Back to business:

I don't have time for full analysis, but I understand what you're trying to do.
I noticed you always mention %s, are you aware it's no longer used it's now #1, #2, #3 for author, date time variables (in that order) instead?

(In reply to Anje from comment #3)
> Although it says 'If you need one directly edit user.js instead,'
> There is no user.js file, so i presumed they meant prefs.js and maybe the
> website page had not been updated to reflect this.

Well, prefs.js might work, but I think it's not recommended.
You should really create your own user.js
http://kb.mozillazine.org/User.js_file

I'm still suspicious if the setting you set is actually used.
Can you please try this:

Where you usually have "_______\n\nOn #2 #3, #1 wrote:", add something unique (and only once in one file) and start out simple to see if this is used at all, like
1.) "On #2 #3, #1 wrote: xxx Hello world xxx"
2.) "_______On #2 #3, #1 wrote: xxx myline xxx"
3.) ""_______\n\nOn #2 #3, #1 wrote: xxx withlinebreaks xxx"

So if you don't even see xxx Hello world xxx, you're editing the wrong pref, or the pref is not activated by your settings.
Also, try creating user.js and do the same there.
Let me know if that helps.


"_______\n\nOn #2 #3, #1 wrote:"
Many thanks for your assistance.
Performed all tests (including the user.js) as specified to no avail.
I concluded that something was not using the preference: mailnews.reply_header_ondate.
You were correct in that I was not aware of the recent changes.

However, you did point me in the right direction.
In Config Editor, I located a new preference:
mailnews.reply_header_ondateauthorwrote; On #2 #3, #1 wrote:

So in the 'prefs.js' file, I tried this:
user_pref("mailnews.reply_header_ondateauthorwrote", "_______________________________________________________\n\n\nOn #2 #3, #1 wrote:");

This has fixed the issue and is working in version 31.0

I'm very grateful for your time in helping me to resolve this.
(In reply to Anje from comment #7)
> Many thanks for your assistance.
> Performed all tests (including the user.js) as specified to no avail.
> I concluded that something was not using the preference:
> mailnews.reply_header_ondate.
> You were correct in that I was not aware of the recent changes.

Well, is there any documentation for this change? (We should file a bug if there isn't...) I guess there's nothing about this in the release notes (which aren't in good shape atm), so it's not easy to become aware...

> However, you did point me in the right direction.
> In Config Editor, I located a new preference:
> mailnews.reply_header_ondateauthorwrote; On #2 #3, #1 wrote:
> 
> So in the 'prefs.js' file, I tried this:
> user_pref("mailnews.reply_header_ondateauthorwrote",
> "_______________________________________________________\n\n\nOn #2 #3, #1
> wrote:");
> 
> This has fixed the issue and is working in version 31.0

Awesome! :)

Did you try outsourcing the new pref into user.js as well?
It will supersede prefs.js so it's really more recommended to use user.js with the added advantage you can always swap that around while keeping prefs.js intact...

> I'm very grateful for your time in helping me to resolve this.

Most welcome, Anje. CC me on such bugs if there's something I should know or comment on.
I've been around long enough to know a lot and if I'm aware and convinced of a manageable bug or RFE there's a good chance of me getting others on board to try and fix things provided we can with the limited ressources of volunteer manpower since Mozilla withdrew funding.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
Whiteboard: [needs followup bug for documenting recent changes to reply header prefs]
regarding comment 8:
re: "Well, is there any documentation for this change? (We should file a bug if there isn't...) I guess there's nothing about this in the release notes (which aren't in good shape atm), so it's not easy to become aware..."

I have created a bug report for this.
https://bugzilla.mozilla.org/show_bug.cgi?id=1060318


re: "Did you try outsourcing the new pref into user.js as well?
It will supersede prefs.js so it's really more recommended to use user.js with the added advantage you can always swap that around while keeping prefs.js intact... "

I have created the user.js file and will use as advised.
(In reply to Anje from comment #9)
> I have created the user.js file and will use as advised.

Does it work?
Closed TB
Edited prefs.js so that it appears as the original default setting.
Used the user.js file which I created to enter the line:
user_pref("mailnews.reply_header_ondateauthorwrote", "_______________________________________________________\n\n\nOn #2 #3, #1

Restarted TB and tested.
All works perfectly.

I have asked those on MozillaZine to update their webpage to include the additional information.
You need to log in before you can comment on or make changes to this bug.