Closed Bug 650527 Opened 13 years ago Closed 13 years ago

The star button incorrectly shows bookmarked when the page is tagged but not bookmarked

Categories

(Firefox :: Bookmarks & History, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: tabutils+bugzilla, Unassigned)

Details

(Keywords: regression)

User-Agent:       Mozilla/5.0 (Windows NT 5.1; rv:6.0a1) Gecko/20110416 Firefox/6.0a1
Build Identifier: Mozilla/5.0 (Windows NT 5.1; rv:6.0a1) Gecko/20110416 Firefox/6.0a1

When the current page is tagged but not bookmarked, the star button incorrectly shows bookmarked.


Reproducible: Always

Steps to Reproduce:
1. Open a new unbookmarked page
2. Execute in JS shell: 
> PlacesUtils.tagging.tagURI(gBrowser.currentURI, ["pinned"]);

Actual Results:  
The star button changes to bookmarked

Expected Results:  
The star button should not change
Version: unspecified → Trunk
tags are for bookmarks, the API has some flaw but we don't consider tags to non-bookmarked entries. that's why the UI fails.
Also I think I already said previously that before calling tagURI you should add a bookmark to unsortedBookmarksFolderId. otherwise the tag will be considered an orphan.
It behaves differently in Firefox 3.6. According to the implementation of nsITaggingService, it doesn't care whether the uri is bookmarked or not. Does some design change?
Keywords: regression
It says "Provides methods to tag/untag a URI...". It's for URIs, not for bookmarks.
As I said the API has a flaw, the behavior never changed in 3.5 or 3.6, most likely in 3.0 too.
Was originally designed to tag uris, but never worked like that, taggin a uri would be pretty much useless since the uri could disappear at any time due to expiration.
The star behavior does change from 3.6 to 4.0. In 3.6, if you tag a URI but don't bookmark it, the star state doesn't change.
Read PlacesUtils.getBookmarksForURI and PlacesUtils.getMostRecentBookmarkForURI at: http://mxr.mozilla.org/mozilla-central/source/toolkit/components/places/PlacesUtils.jsm#1026. They both do filtering.
Yes, that changed in 4.0 and makes sense as it is now, since there is no visible bookmark in the UI if you tag a not-bookmarked uri.
So you could consider this bug somehow fixed, the Firefox ui could not have activated the bug, btw.
Closing per comment 7
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
I don't understand why this issue is considered resolved and closed.  It seems quite clear to me that there is a problem.  

1.  When I click "Bookmarks" and then "Bookmark this page", the UI says "Page Bookmarked".  Assuming it was not bookmarked some time in the past, the page IS NOT BOOKMARKED AT THIS STAGE.  If I now close Firefox and reopen Firefox and search for the bookmark, it DOES NOT EXIST.

2.  What could be more straightforward?  The wording is misleading--no, I would prefer to say WRONG.  

As an aside, I see there were--long ago--at least two  other reports of this INCORRECT verbiage: 445279, 415781. These too were closed for reasons I can not comprehend.   And, as to changing it to an Enhancement from a Bug--why would something that is INCORRECT not be considered a bug?
(In reply to Joe Petree from comment #9)
> I don't understand why this issue is considered resolved and closed.  It
> seems quite clear to me that there is a problem.  
> 
> 1.  When I click "Bookmarks" and then "Bookmark this page", the UI says
> "Page Bookmarked".  Assuming it was not bookmarked some time in the past,
> the page IS NOT BOOKMARKED AT THIS STAGE.  If I now close Firefox and reopen
> Firefox and search for the bookmark, it DOES NOT EXIST.
> 
> 2.  What could be more straightforward?  The wording is misleading--no, I
> would prefer to say WRONG.  
> 
> As an aside, I see there were--long ago--at least two  other reports of this
> INCORRECT verbiage: 445279, 415781. These too were closed for reasons I can
> not comprehend.   And, as to changing it to an Enhancement from a Bug--why
> would something that is INCORRECT not be considered a bug?

Ok, nevermind..... I take all that back.   I see the page really has been bookmarked.   Which is very confusing, nevertheless.   I now can assign the bookmark to the folder I want it in, which now MOVES the bookmark.  I think the CANCEL button at this stage, should be UNDO.  And maybe a 3rd button added to MOVE the bookmark.
You need to log in before you can comment on or make changes to this bug.