Closed Bug 39539 Opened 24 years ago Closed 24 years ago

it is impossible to create new bookmarks/folders

Categories

(SeaMonkey :: Bookmarks & History, defect, P1)

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: cmaximus, Assigned: slamm)

References

Details

(Whiteboard: [nsbeta2+][rjc])

***Overview Description: 

  You can 'Add Current Page' just fine but new bookmarks can't be created

***Steps to Reproduce: 

1) Open manage Bookmarks. Select File| New Bookmark.

2) Type in a url.

3) type in a name.



***Actual Results: 

	The dialog that appears is the wrong dialog!!! it is titled User Name but it has the right text. This is true for both dialogs. No 
bookmarks is created after OK'ing both dialogs.

***Expected Results: 

	Create the bookmark I just took the trouble to write out

***Build Date & Platform Bug Found: 

All Platforms with the 2000051609 builds.
*** Bug 40131 has been marked as a duplicate of this bug. ***
M16 Linux 2000-052208:

Same goes for new/folder. JS error in console on Linux is:



JavaScript error:

line 0: uncaught exception: [Exception... "Component returned failure code:

0x80004005 (NS_ERROR_FAILURE) [nsIRDFDataSource.DoCommand]"  nsresult:

"0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome:

//communicator/content/bookmarks/bookmarks.js :: doContextCmd :: line 1080"

data: no]

Yep, that's broken allright.  Nominating for nsbeta2.
Keywords: nsbeta2
Priority: P3 → P1
Target Milestone: --- → M18
*** Bug 40835 has been marked as a duplicate of this bug. ***
Putting on nsbeta2+ radar.
Whiteboard: [nsbeta2+]
*** Bug 41570 has been marked as a duplicate of this bug. ***
Added "rjc" to status whiteboard summary since we need Robert's help to fix this
while slamm is away on sabbatical.
Whiteboard: [nsbeta2+] → [nsbeta2+][rjc]
*** Bug 39828 has been marked as a duplicate of this bug. ***
*** Bug 41520 has been marked as a duplicate of this bug. ***
relevant comments from one of the dupes:

------- Additional Comments From David Hugh-Jones 2000-06-11 09:27 -------

As requested:
1. Using 'file-->new bookmark', the dialogs pop up, and I am able to enter a url
and name, but the new bookmark does not appear. The same happens using the
context menu and 'new bookmark' with the personal toolbar folder selected.

2. I can create bookmarks/folders/separators so long as a top level item is not
selected - for example, if I select a bookmark within my 'humour' folder, then
items are created within the same folder. But nothing gets created if any top
level item is selected. The dialogs pop up and work but nothing appears.
Summary: it is impossible to create new bookmarks → it is impossible to create new bookmarks/folders
This bug happens because insertBookmarkItem calls container->Init(mInner, 
argParent).  The Init() function calls RDFContainerUtils->IsContainer(), and 
tries to find if argParent is a container.  It isn't, so it returns 
RDF_ERROR_FAILURE, which is the jscript throw we're seeing.

Best guess: argParent isn't a container, but insertBookmarkItem assumes it is.
It looks like slamm broke this by adding a <treechildren> tag into the bookmarks
<tree> with an "id" set on it.

Here's a diff of a proposed fix... anyone care to try it out?


Index: bookmarks.js
===================================================================
RCS file: /cvsroot/mozilla/xpfe/components/bookmarks/resources/bookmarks.js,v
retrieving revision 1.71
diff -r1.71 bookmarks.js
1191,1194c1191
<         var theParent = node;
<         while (theParent)
<         {
<             theParent = theParent.parentNode;
---
>         var theParent = node.parentNode.parentNode;
1201,1202c1198
<             if (parentURI != "") break;
<         }
---
> 
Rob (Ginda) or Ben (Goodger), care to try out this patch for me?
works for me! 
Fix checked in.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
*** Bug 43155 has been marked as a duplicate of this bug. ***
VERIFIED Fixed with 2000062809 builds
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.