Closed Bug 1343256 Opened 3 years ago Closed 2 years ago

Bookmark keywords disappear from one bookmark when adding a keyword to another bookmark

Categories

(Firefox :: Bookmarks & History, defect, P2)

51 Branch
defect

Tracking

()

VERIFIED FIXED
Firefox 55
Tracking Status
firefox51 --- wontfix
firefox52 - wontfix
firefox-esr52 54+ fixed
firefox53 + wontfix
firefox54 + verified
firefox55 + verified

People

(Reporter: garyking, Assigned: mak)

References

Details

(Keywords: dataloss, regression, Whiteboard: [fxsearch])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:51.0) Gecko/20100101 Firefox/51.0
Build ID: 20170125094131

Steps to reproduce:

1. Create a new Firefox profile.
2. Bookmark two webpages in the Bookmarks Menu.
3. Give both bookmarks unique keywords. After giving the second bookmark a keyword, the keyword from the first bookmark disappears. If I try and give a keyword to the first bookmark, then the keyword in the second bookmark disappears. So only the last keyword I add will remain.
Component: Untriaged → Bookmarks & History
I suppose the 2 bookmarks don't have the same url, right?
See Also: → 1324468
Gary, could you give more details about the bookmark URL?
Flags: needinfo?(garyking)
I am having the same issue. The bookmarks do not have the same URL.

In my case, I have multiple bookmarks in the same folder (this detail might not be relevant). Almost all of them have their keywords. When I try to add the keyword to one with no keyword, it erases the keywork of another bookmark. I don't know how to predict which bookmark is affected (didn't do any investigating on that). I also don't know if only one other bookmark loses its keyword or more.
Epsilon, which version are you using? Firefox on OSX?
Firefox 51.0.1 (32 bits) running on Windows 8.
I did further investigation and found some very interesting behaviours. Here are my observations :

1 - Adding a keywork via the dialog box when creating a new bookmark (using right click in the bookmark library) does not affect the other bookmarks.
2 - Modifying a keyword already existing (not empty) does not affect the other bookmarks.
3 - Adding a new keywork via the form at the bottom of the bookmark library does affect another bookmark which loose its keyword.
4 - The bookmark affected (following obseration 3) is the one that was selected before if it had a keyword. If not, the last selected one with a keyword. Up to now, this is always true and across different folders also.

So basically, when I modify the keyword of a bookmark using the field on the bottom of the bookmark library window, the keyword of last bookmark selected previously which had a keyword is erased.
(In reply to Epsilon from comment #6)
> So basically, when I ****modify**** the keyword of a bookmark using the field on the
> bottom of the bookmark library window, the keyword of last bookmark selected
> previously which had a keyword is erased.

Little correction here, it is when I add a keyword to a bookmark that the last selected one with keyword is affected, not when I modify the keyword (as stated in my observation 2).

Sorry for the repost. I don't see how I can edit my last post if that is possible.
Ty Epsilon, I'm able to reproduce now.

STR:
1) Create a New Folder in the bookmark toolbar and add 2 random bookmarks
2) Open the Library (Ctrl+Shift+B) and select New Folder
3) Select the 1st bookmark and add a keyword
4) Select the 2nd bookmark and add a keyword

Result: after step 4), the keyword of the 1st bookmark is removed. You can cycle endlessly like that by adding a new keyword previouly removed.

Reg range:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=d5f20820c80514476f596090292a5d77c4b41e3b&tochange=d0830980ffdb36a10855d02a588b4869cad6707e

Marco Bonardo — Bug 1150678 - Changing url of a bookmark with a keyword breaks the keyword forever. r=adw
Blocks: 1150678
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
OS: Unspecified → All
Hardware: Unspecified → All
See Also: 1324468
Duplicate of this bug: 1324468
Too late for 51 and 52 will be released this week. Mark 51 won't fix.
Priority: -- → P2
Whiteboard: [fxsearch]
Flags: needinfo?(garyking)
Duplicate of this bug: 1344430
Assignee: nobody → mak77
Getting late for beta (53) uplift, but if you land a fix we could still take a patch in 54.
I'm a bit overloaded atm, I'll see what I can do, but I can't give a deadline.
I think the problem is just a missed initialization in editBookmarkOverlay, that in the Library is reused across items. But writing a test requires some time.
For anyone else who discovers this an needs a workaround, I just spent a good 10 minutes fighting with FF after discovering this bug trying to update a keyword. I figured out the correct sequence to work around the bug and end up with all bookmarks properly saved:

At a high level, the below sequence just uses the first item in the list as the target for the bug, so that you can re-open and re-add the keyword to it without triggering the bug again by changing selection.

1) Open bookmarks
2) Select the folder where your keyword bookmarks are stored (in my case, all my search bookmarks are in one folder, and they all have keywords)
3) The first bookmark in the list is now selected by default.
4) Select a different bookmark that you want to edit. (Do not scroll to it via arrow keys, click the other bookmark directly so that it is the 2nd bookmark selected in the UI)
5) Edit the bookmark keyword.
6) Close the bookmark manager.
7) Open the bookmark manager.
8) Select the same keyword bookmark folder
9) The first bookmark is selected again. Without changing the selection, note that the keyword is now missing.
10) Correct the missing keyword and re-add it.
11) Close the bookmark manager without changing the selection.

All of the bookmarks should now have their keywords correctly set.
Comment on attachment 8863750 [details]
Bug 1343256 - Bookmark keywords disappear from one bookmark when adding a keyword to another bookmark.

https://reviewboard.mozilla.org/r/135530/#review139600

Looks good. r=Standard8

::: browser/components/places/tests/chrome/test_editBookmarkOverlay_keywords.xul:77
(Diff revision 1)
> +          parentGuid: PlacesUtils.bookmarks.unfiledGuid,
> +        });
> +        info("Init panel on the first bookmark");
> +        let node = yield PlacesUIUtils.promiseNodeLikeFromFetchInfo(bm);
> +        gEditItemOverlay.initPanel({ node });
> +        info("Add a keyword to the first bookmark");

Maybe move this comment to after the keyword field is empty check?
Comment on attachment 8863750 [details]
Bug 1343256 - Bookmark keywords disappear from one bookmark when adding a keyword to another bookmark.

https://reviewboard.mozilla.org/r/135530/#review139618
Attachment #8863750 - Flags: review?(standard8) → review+
Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/86de1de2f3f3
Bookmark keywords disappear from one bookmark when adding a keyword to another bookmark. r=standard8
https://hg.mozilla.org/mozilla-central/rev/86de1de2f3f3
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Comment on attachment 8863750 [details]
Bug 1343256 - Bookmark keywords disappear from one bookmark when adding a keyword to another bookmark.

Approval Request Comment
[Feature/Bug causing the regression]: bug 1150678
[User impact if declined]: Assigning a keyword to a bookmark in the Library may overwrite the keyword for a previously selected bookmark
[Is this code covered by automated tests?]: yes
[Has the fix been verified in Nightly?]: not yet
[Needs manual test from QE? no, there's an automated test.
[List of other uplifts needed for the feature/fix]: none
[Is the change risky?]: no
[Why is the change risky/not risky?]: code changes are limited to the keyword handling in the edit bookmark dialog, includes automated test
[String changes made/needed]: none
Attachment #8863750 - Flags: approval-mozilla-beta?
Comment on attachment 8863750 [details]
Bug 1343256 - Bookmark keywords disappear from one bookmark when adding a keyword to another bookmark.

Fix a long standing bookmark keyword issue. Beta54+. Should be in 54 beta 6.
Attachment #8863750 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: qe-verify+
Should we consider uplifting this to ESR52 as well?
Flags: needinfo?(mak77)
Keywords: dataloss
(In reply to Ryan VanderMeulen [:RyanVM] from comment #24)
> Should we consider uplifting this to ESR52 as well?

If the patch applies cleanly, we could. Atm I don't have the time to check or do a porting.
Flags: needinfo?(mak77)
There was a trivial conflict in Bookmarks.jsm that was easy to rebase around. Looks good on Try:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=522d4eedf2b10c15bf093c223b8b7598ed8df410
Comment on attachment 8863750 [details]
Bug 1343256 - Bookmark keywords disappear from one bookmark when adding a keyword to another bookmark.

See comments 21 and 26. Boo dataloss.
Attachment #8863750 - Flags: approval-mozilla-esr52?
I've reproduce this issue using STR from Loic's comment 8, on an affected build.

This is verified fixed on latest Nightly 55.0a1 (2017-05-10) and 54 beta 6 (2017-05-08) across platforms:
- Windows 10 x64
- Mac OS X 10.11.6
- Ubuntu 16.04 x64 LTS
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Comment on attachment 8863750 [details]
Bug 1343256 - Bookmark keywords disappear from one bookmark when adding a keyword to another bookmark.

fix loss of bookmark keywords, verified in beta/nightly, esr52.2+
Attachment #8863750 - Flags: approval-mozilla-esr52? → approval-mozilla-esr52+
This recent changes with keyword-bookmarks things are a disaster. How is it possible to use 2 different keywords for the same search url now? It was quite useful to make 2 bookmarks with the same search and give different keywords - e.g. in 2 different keyboard layouts, so the search would work without keyboard layout switching. 

It worked for years in Fiefox and not it's broken!

Is it even normal, that keyword is now a property of some "url", but it is set at bookmark properties, not urls's? Isn't it logical, that keyword and url are properties of bookmark and than everything works - there can be 2 bookmarks with different keywords and the same url. 

Any ideas, how to make it work, as it always was working in Firefox before this keyword-bookmark changes? It's a terrible inconvenience to check layout each time for people out of US/UK with 2+ layouts. Please look Bug 1362325 for details (it's not resolved really).
You need to log in before you can comment on or make changes to this bug.