drag contact to another address book fails NS_ERROR_STORAGE_CONSTRAINT: Component returned failure code: 0x80630003
Categories
(MailNews Core :: Address Book, defect)
Tracking
(thunderbird71 fixed, thunderbird72 fixed)
People
(Reporter: wsmwk, Assigned: darktrojan)
References
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
2.53 KB,
patch
|
mkmelin
:
review+
mkmelin
:
approval-comm-beta+
|
Details | Diff | Splinter Review |
NS_ERROR_STORAGE_CONSTRAINT: Component returned failure code: 0x80630003 (NS_ERROR_STORAGE_CONSTRAINT) [mozIStorageStatement.execute] AddrBookDirectory.jsm:745
dropCard resource:///modules/AddrBookDirectory.jsm:745
onDrop chrome://messenger/content/addressbook/abDragDrop.js:334
drop chrome://messenger/content/addressbook/abTrees.js:212
Reporter | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
This is basically saying that you already have the card you're copying. But it thinks that because it's replaced the card's unique identifier with "1".
Why did it do that? Because I misread a line of code that was unambiguous until Prettier came along and removed the brackets.
Assignee | ||
Comment 2•5 years ago
|
||
I don't think there's much worth doing about the mangled UID. No data's been lost, except that card now has a UID of 1.
Comment 3•5 years ago
|
||
Assignee | ||
Comment 4•5 years ago
|
||
It should always have a UID, but you never know. It could be from some weird new address book provider that doesn't automatically assign them. If needToCopyCard
is true we assign a new UID so that it doesn't have the same one as the original card.
Assignee | ||
Updated•5 years ago
|
Comment 5•5 years ago
|
||
Sure you can get beta approval, but how about getting review first?
Assignee | ||
Updated•5 years ago
|
Comment 6•5 years ago
|
||
(In reply to Geoff Lankow (:darktrojan) from comment #4)
It should always have a UID, but you never know. It could be from some weird new address book provider that doesn't automatically assign them.
I think they do need to have an UID. We should require that.
Updated•5 years ago
|
Assignee | ||
Comment 7•5 years ago
|
||
So what do you want me to actually do here?
Assignee | ||
Comment 8•5 years ago
|
||
… bearing in mind that the change I'm proposing just puts the code back how it was before the regression I caused.
Assignee | ||
Updated•5 years ago
|
Comment 9•5 years ago
|
||
Maybe we just don't want to allow dragging if the card doesn't have an id to begin with (because something's wrong)? Bail out at https://searchfox.org/comm-central/rev/496170162015a8c4a4087c18479279b4ce3b2cbf/mailnews/addrbook/content/abDragDrop.js#90 ?
Wayne, how did you end up with the brokenness?
Reporter | ||
Comment 10•5 years ago
|
||
I don't know precisely. Best recollection - I had updated beta and my ABs were converted, then simply tried to drag a contact from Personal Address Book to another AB.
Assignee | ||
Comment 11•5 years ago
|
||
The card does have a UID. The code replaced it with "1" because I screwed up. This patch undoes the screw-up.
Comment 12•5 years ago
•
|
||
What card are we talking about that has the UID=1? So just some temporary flux no end user will see?
Assignee | ||
Comment 13•5 years ago
|
||
The card added to the destination database is given the UID 1. This error is caused at the next call to dropCard, which also assigns UID 1 to a card and tries to add it to the database.
Fortunately all this has caused is preventing the user moving cards from one address book to another, and no real damage.
Comment 14•5 years ago
|
||
I see.
Can we make it newCard._uid = needToCopyCard ? newUID() : card.UID;
- don't allow dragging cards withough UIDs?
Assignee | ||
Comment 15•5 years ago
|
||
Comment 16•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Comment 17•5 years ago
|
||
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/aec0ee0dc9f8
Prevent copying an address book card without a UID, and fix copying cards from one book to another; r=mkmelin DONTBUILD
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 18•5 years ago
•
|
||
Assignee | ||
Updated•5 years ago
|
Description
•