Closed Bug 376302 Opened 17 years ago Closed 17 years ago

unable to drop favicon or link onto personal toolbar folder, favicon drop leaves the cursor behind

Categories

(Firefox :: Bookmarks & History, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: moco, Assigned: moco)

Details

Attachments

(3 files)

unable to drop favicon or link onto personal toolbar folder, favicon drop leaves the cursor behind

this is with my own debug, windows, trunk-with-places-bookmarks build:

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a4pre) Gecko/20070402 Minefield/3.0a4pre

I'll attach a screen shot.

see also bug #375481, but with this regression i don't see anything in the console.
>  favicon drop leaves the cursor behind

but note, url drops (from links in a page) do not leave the cursor behind.
Does this work on windows? I think this is the same issue as reported on bug 358446 (custom d&d flavors don't work).
> Does this work on windows? I think this is the same issue as reported 
> on bug 358446 (custom d&d flavors don't work).

That's a cocoa bug, and I'm seeing the problem on Windows XP.  (I haven't tried Mac OS X.)

Note, I know this used to work very recently, as it regressed (but we fixed it) on 03-26-2007, see bug #375481.
fwiw, I'm still seeing this, even with a fresh profile.

dietrich / mano:  do you think this is bad enough to be added to the list of places-bm-blockers for the next alpha?
a silent failure in PCDH_onDrop()

ex = TypeError: createTxn.childTransactions has no properties

working on it...

Assignee: nobody → sspitzer
this appears to be a case of a missing underscore:

-      createTxn.childTransactions.push(
+      createTxn._childTransactions.push(

it moved from childTransactions to _childTransactions as a result of bug #373504

After switching to use _childTransactions, I get further, but now I'm not getting the title, and I'm getting an error:

************************************************************
* Call to xpconnect wrapped JSObject produced this error:  *
[Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VAL
UE) [nsINavBookmarksService.getItemTitle]"  nsresult: "0x80070057 (NS_ERROR_ILLE
GAL_VALUE)"  location: "JS frame :: chrome://browser/content/places/controller.j
s :: PEITT_doTransaction :: line 1935"  data: no]
************************************************************

that resembles bug #371675 (which was fixed.)

still investigating...
Status: NEW → ASSIGNED
we are attempting to set the title as the child transaction, after the create:

      // Creating and Setting the title is a two step process
      var createTxn =
        new PlacesCreateItemTransaction(data.uri, container, index);
      var title = type == this.TYPE_X_MOZ_URL ? data.title : data.uri;
      createTxn._childTransactions.push(
          new PlacesEditItemTitleTransaction(-1, title));
      return createTxn;

The problem is that in  PlacesEditItemTitleTransaction() the call to this.bookmarks.getItemTitle(this._id); will fail when id is -1.

but it should not be -1, as the parent transaction should be setting the id of the child txns.

more investigating...
Attached patch patchSplinter Review
note, there are other instances in controller.js where we use "id" instead of "_id" that might need to be fixed, too.

but for now, this fixes this bug.
Attachment #263418 - Flags: review?(mano)
Comment on attachment 263418 [details] [diff] [review]
patch

Rather use the fourth argument of the create-item transaction and avoid the child-transaction mess. Transactions which support the child-transactions pseudo-API expose a real |id| setter.
Attachment #263418 - Flags: review?(mano) → review-
Comment on attachment 263423 [details] [diff] [review]
revised patch, per asaf

r=mano
Attachment #263423 - Flags: review?(mano) → review+
fixed

Checking in utils.js;
/cvsroot/mozilla/browser/components/places/content/utils.js,v  <--  utils.js
new revision: 1.32; previous revision: 1.31
done

This should have also impacted mac
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
OS: Windows XP → All
Hardware: PC → All
Resolution: --- → FIXED
verified with: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a8pre) Gecko/2007080805 Minefield/3.0a8pre

this is in litmus
Status: RESOLVED → VERIFIED
Flags: in-litmus+
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h".

In Thunderbird 3.0b, you do that as follows:
Tools | Message Filters
Make sure the correct account is selected. Click "New"
Conditions: Body   contains   places-to-b-and-h
Change the action to "Delete Message".
Select "Manually Run" from the dropdown at the top.
Click OK.

Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter.

Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: