Closed Bug 677884 Opened 13 years ago Closed 13 years ago

New entry in address book not saved. error console has this.yearField is null and aDatepicker.yearField is null

Categories

(Thunderbird :: Address Book, defect)

x86_64
Windows 7
defect
Not set
critical

Tracking

(thunderbird9 fixed)

RESOLVED FIXED
Thunderbird 10.0
Tracking Status
thunderbird9 --- fixed

People

(Reporter: fscheltens, Assigned: mconley)

References

Details

(Keywords: dataloss)

Attachments

(1 file)

Attached image Adress book bug.jpg
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110622 Firefox/5.0 PaleMoon/5.0
Build ID: 20110622191927

Steps to reproduce:

I attempted to add an emailadress to my adress book, to ensure that embedded content was always shown.


Actual results:

Upon pressing the link to always show embedded content, i got the dialog from my adress book as shown:
[IMG]http://i558.photobucket.com/albums/ss25/FScheltens/Adressbookbug.jpg[/IMG]
When pressing the OK button on this dialog, nothing happens.

If i manually open the adress book, make a new contact, enter some information, and press OK, nothing happens.

I have tried turning off EVERY plugin / extension, no difference.


Expected results:

A new entry should have been made in the adress book.

I am using Thunderbird 5.0 (dutch) with the extensions importexporttools, dutch dictionary, english dictionary only.
p.s. For your convenience, a working link:
http://i558.photobucket.com/albums/ss25/FScheltens/Adressbookbug.jpg
Anyhting in Tools -> Error consle when you save the AB entry ?

Can you also try in safemode (see http://support.mozillamessaging.com/en-US/kb/Safe-Mode) ?
The following behaviour is seen both in safe mode and normal mode:

When i open the address book and press the button "new entry", i get the following two errors in my console. I also get these errors when i open an existing entry:

Fout: this.yearField is null
Bronbestand: chrome://global/content/bindings/datetimepicker.xml
Regel: 827

Fout: aDatepicker.yearField is null
Bronbestand: chrome://messenger/content/addressbook/abCardOverlay.js
Regel: 798

I would also like to add the following information:

When i send out an email, the address in my email is added to the address book, under "Collected addresses"(or whatever its called in the english version).

When i open a collected address, edit the description, and press OK, again nothing happens. The edited description does show up in the address book window, until i click on a different address book. Then when i return to the previous address book, the original description is shown.
p.s. In case it was not clear from the text above: no entries are made in the error log when i press the OK button. The command is just not processed or something.
This bug is a duplicated of bug 572666
This bug seem to be related to bug 648503
I have this bug on my TB 6.0.1 

I'm using windows 7 32 Bit. 

My local date setting are set to Hebrew lunar calender instead of Gerogian calender this might affect the bug.
Yup, when changing to Georigan calender the bug was not present.
Investigating...
Assignee: nobody → mconley
Nathan:

As a Thunderbird developer, this is a rather embarrassing question: how exactly does one switch back and forth from the Hebrew lunar calendar to the Gregorian calendar?  This will help me reproduce, and therefore fix the problem.

Thanks,

-Mike
I am assuming that the article at 
http://windows.microsoft.com/en-US/windows7/Display-Hijiri-dates#

points in the right direction.
mconley, Nathan has connected some dotst ... so you can pick your poison/bug :)   (bug 572666, bug 648503, bug 494860, ...) -- perhaps this bug has the most info.
Severity: normal → critical
Keywords: dataloss
Summary: New entry in adress book does not work → New entry in address book not saved. error console has this.yearField is null and aDatepicker.yearField is null
Switching calender between Georgiana and Hebrew. 
Control panel-> Region and language -> set to "Hebrew (Israel)" -> Additional settings button -> Date tab -> Calender type (the first option in pull-down is Gregorian calender, the second option is Hebrew calender)
Ok, I just reproduced this on Windows 7.

Steps to reproduce in Windows 7 (assuming you're starting with an English locale, using Gregorian calendar)

1)  Go to Control Panel > Clock, Language and Region
2)  Under "Region and Language", choose "Change the date, time or number format"
3)  In the Region and Language window that comes up, change the Format (in the Formats tab) to "Hebrew (Israel)"
4)  Click "Additional Settings" at the bottom of the window
5)  In the "Customize Format" window that comes up, switch to the "Date" tab, and choose the second option for the Calendar format.  This should change the year to be in the 5000's.
6)  Click Apply
7)  Start Thunderbird, and try to create a contact in the address book

What happens?:

Pressing "OK" to save the contact does nothing.  The error console displays:

Error: this.yearField is null
Source File: chrome://global/content/bindings/datetimepicker.xml
Line: 832

Error: aDatepicker.yearField is null
Source File: chrome://messenger/content/addressbook/abCardOverlay.js
Line: 789

What's expected?

We expect the contact to be saved properly.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
I have just succesfully identified which setting is responsible for this bug:
After reading above post i changed my location settings twice, to the US, and then back to dutch. Both of these eliminated the bug!
After systematically eliminating possibilities i found the culprit: The short date notation (highlighted):

(control panel -> clock, language and region -> additional settings -> date) 
http://i558.photobucket.com/albums/ss25/FScheltens/Miscellanious/Dateformatbug.jpg

Changing the format of the short date notation in the dropdown list on the first screen (control panel -> clock, language and region) did not appear to trigger the bug.
Changing the short date notation to 'dddd dd MMM' caused the bug to manifest. 

Changing the short date notation to 'dddd dd MMM jj' eliminated the bug, so I assume that it has something to do with the years. 
I hope this helps you guys, this is as specific as i can be without reading the Thunderbird sourcecode ....
F Scheltens:

Oh, excellent - yes, that reproduces the bug nicely.  Thanks!

More direct steps to reproduce:

1)  Go to Control Panel > Clock, Language and Region
2)  Under "Region and Language", choose "Change the date, time or number format" - a Region and Language window should appear.
3)  Click "Additional Settings" at the bottom of the Region and Language window
4)  Choose the "date" tab
5)  For the Short Date, set the format to: "dddd dd MMM"
6)  Click "Apply"
7)  Start Thunderbird, and try to create a contact in the address book

What happens?:

Pressing "OK" to save the contact does nothing.  The error console displays:

Error: this.yearField is null
Source File: chrome://global/content/bindings/datetimepicker.xml
Line: 832

Error: aDatepicker.yearField is null
Source File: chrome://messenger/content/addressbook/abCardOverlay.js
Line: 789

What's expected?

We expect the contact to be saved properly.
So, on further investigation (and some help from a XUL wizard), it looks like the datepicker widget initialization function in Gecko is getting confused when the locale short-date string doesn't match a certain regular expression.  It's not a critical confusion - the init function is really just trying to determine whether or not we should be using mm/dd/yyyy or dd/mm/yyyy or yyyy/mm/dd, etc.

That bug is filed here:  https://bugzilla.mozilla.org/show_bug.cgi?id=488627

Perhaps I can tackle that bug.  I'll look into it.
Depends on: 488627
Alright, I landed a patch for bug 488627 - it's slated for release with Gecko/Firefox/Thunderbird 10.

Manual testing showed that it fixed the contact editor for system locales with more unusual short datetime formats.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 10.0
I've requested that the patch land in Aurora (TB 9) and Beta (TB 8) - we'll see what happens.
Ok, this fix is landing in TB 9.

Or, if you're impatient, in a week or so, it should get baked into the next build of Earlybird:

http://www.mozilla.org/en-US/thunderbird/channel/
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: