Closed
Bug 486481
Opened 15 years ago
Closed 15 years ago
Weird behavior when syncing the bookmark with tags
Categories
(Cloud Services :: General, defect)
Cloud Services
General
Tracking
(Not tracked)
RESOLVED
FIXED
0.4
People
(Reporter: mishail.mishail, Assigned: mishail.mishail)
References
Details
Attachments
(8 files, 4 obsolete files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3) Gecko/20090305 Firefox/3.1b3 (.NET CLR 3.5.30729) Build Identifier: Weave 0.3 When I sync bookmark with tags it appears incorrectly at the other PC Reproducible: Always Steps to Reproduce: Reproduced on clean/new profile with default Firefox's bookmarks only on 2 PCs 1. Install weave 0.3 2. Make an initial sync (bookmarks - only default ones from Firefox installation). Both PCs have bookmarks as displayed at home_before.png and home_tags_before.png 3. Add any bookmark with tags at 1st PC. In the example I used Weave URL from AMO with tags "firefox, weave, addon" 4. Make a sync Actual Results: The bookmark is correctly added only at 1st PC (see home_after.png). On the 2nd PC bookmarks are "broken", see work_after.png Expected Results: The same bookmarks at both PCs (as displayed at home_after.png) Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3) Gecko/20090305 Firefox/3.1b3 (.NET CLR 3.5.30729) At both PCs
Assignee | ||
Comment 1•15 years ago
|
||
Assignee | ||
Comment 2•15 years ago
|
||
Assignee | ||
Comment 3•15 years ago
|
||
Assignee | ||
Comment 4•15 years ago
|
||
Assignee | ||
Comment 5•15 years ago
|
||
Assignee | ||
Comment 6•15 years ago
|
||
Assignee | ||
Updated•15 years ago
|
Version: unspecified → 0.3
Assignee | ||
Comment 7•15 years ago
|
||
I guess it could be related to "smart bookmarks" (Recently bookmarked and Recent tags) in the Bookmark menu. Those are bookmarks with places query as URL (http://forums.mozillazine.org/viewtopic.php?p=3260477), but they are displayed as "folders" to user. It seems that Weave treat them as plain folders too, and tries to update their content.
Assignee | ||
Comment 8•15 years ago
|
||
One more observation. Issue seems to be related to "Recent tags" query and happens when new tag appears in the query's results. It's displayed as a new folder. May be Weave should check the parent's type for folder and skip those folders with RESULT_TYPE_QUERY as parent?
Assignee | ||
Comment 9•15 years ago
|
||
I've added checking of "tags" folder (nsINavBookmarksService.tagsFolder) as one of the roots, besides with "menu", "toolbar", "unfiled". It seems to be working for me... I will test on clean profile
Assignee | ||
Comment 10•15 years ago
|
||
BTW, should weave check "places" (placesRoot) also?
Assignee | ||
Comment 11•15 years ago
|
||
Assignee | ||
Comment 12•15 years ago
|
||
Comment on attachment 370634 [details]
Check fot "tags" root
Doesn't fix
Attachment #370634 -
Attachment is obsolete: true
Assignee | ||
Comment 13•15 years ago
|
||
Comment on attachment 370641 [details]
Bookmarks.js with checks for root and tags
Doesn't fix. I give up
Attachment #370641 -
Attachment is obsolete: true
Comment 14•15 years ago
|
||
It seems like we're syncing the tags folder perhaps? Firefox internally stores tags as bookmarks, so we might accidentally be syncing them like any other bookmark folder. But some reason I don't see any of this strangeness on my regular weave profile. On a new test profile, I do see a lot of strangeness like multiple synced bookmarks for a bookmark tagged multiple times.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 15•15 years ago
|
||
Mikhail, could you attach a patch containing the changes you've made instead of the whole file? Did you grab the source or are you modifying things from the extension .xpi?
Comment 16•15 years ago
|
||
mishail: I've made your changes into a patch, but what did you mean by it doesn't work? I just synced with a fresh profile and I don't see tags folders appearing on the other profile with your patch. I still see duplicate bookmarks though.. but that might be a separate issue.
Updated•15 years ago
|
Assignee: nobody → mishail.mishail
OS: Windows XP → All
Hardware: x86 → All
Target Milestone: -- → 0.4
Comment 17•15 years ago
|
||
The correct thing to do here is not to try to sync the contents of the tags toplevel folder. Instead, we should *ignore* it. In Weave, tags are stored as a field inside each bookmark record. In places, they appear as pseudo-bookmarks under tag folders. If we sync these pseudo bookmarks they will end up duplicated on the other end. The fix is in the tracker, I think. If the parent or grandparent of the item just changed is the tags folder, simply ignore it.
Assignee | ||
Comment 18•15 years ago
|
||
Could someone review?
Assignee | ||
Comment 19•15 years ago
|
||
Comment on attachment 371010 [details] [diff] [review] Check the parent and grand parent in Tracker Wrong format
Attachment #371010 -
Attachment is obsolete: true
Assignee | ||
Comment 20•15 years ago
|
||
New version (hg diff -p -U 8 used)
Assignee | ||
Comment 21•15 years ago
|
||
BTW, there are no checks either for Livemarks or for Tags in BMT_onItemMoved. Is that correct?
Comment 22•15 years ago
|
||
(In reply to comment #20) > Created an attachment (id=371016) [details] > Check the parent and grand parent in Tracker. v2 > > New version (hg diff -p -U 8 used) Thanks, I much prefer it like that. It still has some of your previous additions, btw. I'll review the rest shortly. (In reply to comment #21) > BTW, there are no checks either for Livemarks or for Tags in BMT_onItemMoved. > Is that correct? I think for livemarks it is correct. If you move a livemark out of the livemark container it would mean you intend to keep it, so we should treat it like a normal bookmark. Though, I guess if you move it within the container (presumably accidentally) we should ignore it. For tags, that should theoretically never happen, since those items are never moved, only created and removed internally by Places.
Assignee | ||
Comment 23•15 years ago
|
||
New version of patch. Added untagURI in BStore_remove. It seems that _bms.removeItem could leave empty tags...
Assignee | ||
Comment 24•15 years ago
|
||
(In reply to comment #22) > It still has some of your previous additions, btw. If you are talkign about those ones from https://bugzilla.mozilla.org/attachment.cgi?id=370850&action=diff, then I think they are needed... I tried to remove all changes listed in https://bugzilla.mozilla.org/attachment.cgi?id=370850&action=diff from https://bugzilla.mozilla.org/attachment.cgi?id=371016&action=diff and got incorrect sync with some strange follders in the Bookmarks menu.
Assignee | ||
Updated•15 years ago
|
Attachment #371025 -
Flags: review?(thunder)
Assignee | ||
Updated•15 years ago
|
Attachment #371016 -
Attachment is obsolete: true
Updated•15 years ago
|
Attachment #371025 -
Flags: review?(thunder) → review+
Comment 25•15 years ago
|
||
Comment on attachment 371025 [details] [diff] [review] Call untagURI on bookmark before removing that. This patch looks good to me.
Comment 26•15 years ago
|
||
Comment on attachment 371025 [details] [diff] [review] Call untagURI on bookmark before removing that. >+ // Skipping for tags >+ if ((folder == this._bms.tagsFolder) || >+ (this._bms.getFolderIdForItem(folder) == this._bms.tagsFolder)){ Why do you check both if the folder is the tags folder or if it's in the tags folder?
Assignee | ||
Comment 27•15 years ago
|
||
(In reply to comment #26) > Why do you check both if the folder is the tags folder or if it's in the tags > folder? As per Dan: >The fix is in the tracker, I think. If the parent or grandparent of the item >just changed is the tags folder, simply ignore it.
Comment 28•15 years ago
|
||
Ah right. Because each tag has its own id with the parent set to an actual tag with a name which is contained in the tags folder. Is there a particular reason why you added the placesRoot checks?
Assignee | ||
Comment 29•15 years ago
|
||
(In reply to comment #28) > Is there a particular reason why you added the placesRoot checks? Well, it's listed in the "moz_bookmarks_roots" along with "menu", "toolbar", "tags" and "unfiled". So I decided to add that check. I didn't test behavior with tagsFolder checks without placesRoot checks. However in the comment #26 I said that I had observed wrong folders in the bookmarks menu afters sync. There were "History" and "All Tags" folders afters sync, which are children of placesRoot
Assignee | ||
Comment 30•15 years ago
|
||
>>However in the comment #26 I said that I Sorry, in the comment #24
Assignee | ||
Comment 31•15 years ago
|
||
If patch is OK then could someone check in that?
Comment 32•15 years ago
|
||
http://hg.mozilla.org/labs/weave/rev/5bfdbac91166 Add the remaining special top level folders and ignore them for certain behavior like getAllIDs and wipe. Have the tracker ignore changes to things in the tags folder.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Component: Weave → General
Product: Mozilla Labs → Weave
Version: 0.3 → unspecified
Updated•15 years ago
|
QA Contact: weave → general
You need to log in
before you can comment on or make changes to this bug.
Description
•