Closed Bug 250783 Opened 20 years ago Closed 19 years ago

New Folder in the File Bookmark dialog doesn't work [error in addBookmark.js :: createNewFolder]

Categories

(SeaMonkey :: Bookmarks & History, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: mcsmurf, Assigned: florian)

References

Details

(Keywords: regression)

Attachments

(1 file, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a2) Gecko/20040710
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a2) Gecko/20040710

see below

Reproducible: Always
Steps to Reproduce:
1. Go to a website
2. Click on Bookmarks|File Bookmark...
3. Try to add a new folder via New Folder...

Actual Results:  
Nothing happens

Expected Results:  
Show up a dialog to create a new folder

These errors in JS console appear when clicking on New Folder...:
Error: bookmarkView.view has no properties
Source File: chrome://communicator/content/bookmarks/addBookmark.js
Line: 179
Error: uncaught exception: [Exception... "Component returned failure code:
0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXULTreeBuilder.getResourceAtIndex]" 
nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame ::
chrome://communicator/content/bookmarks/addBookmark.js :: createNewFolder ::
line 293"  data: no]
Keywords: regression
mozilla/browser/components/bookmarks/content/addBookmark.js
last modified on July 5th in a checkin for bug 249305
(In reply to comment #1)
> mozilla/browser/components/bookmarks/content/addBookmark.js
> last modified on July 5th in a checkin for bug 249305

You're sure? This bug happens in Mozilla (xpfe) and not in FF (browser)(ok i
didn't check so :)
or.. heh.. ask lxr :P
(In reply to comment #4)
> or.. heh.. ask lxr :P

FF trunk he meant probably, lxr doesn't see any checkin to xpfe
Oops - Didn't know FF checkins turn up on Seamonkey queries in LXR - sorry for
the spam. I'll be going a vacation real soon now!
Ok, when selecting "Bookmarks for [profile-name]" and then pressing New
Folder... this works. So regression in the tree part of Mozilla (thanks for the
hint ;).
OS: Windows 2000 → All
I'm able to reproduce this (at least this bug summary) on "Mozilla/5.0 (Windows;
U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040907 Firefox/1.0 PR (NOT FINAL)",
but the trick is to not have anything selected in the bookmarks tree when you do
"new folder".

one way to get into the "nothing selected" state is to:

1) right click on the bookmarks  toolbar and do "Manage Folder..."
2) select a top level bookmark and drag it into a closed folder.  it is
important that the folder be closed.  this leaves me in a state where nothing is
selected
3) now do "File | New Folder..." or hit the "New Folder" button
I'm confused; is this a seamonkey or a firefox bug?  I can't reproduce this in
firefox; hitting New Folder in either the Add Bookmark dialog or in the
bookmarks manager (either button or via file menu) does the right thing for me.
 (Or almost the right thing -- the folder is created always in the toplevel
instead of in whatever the current folder is in the bookmarks mgr.)
(In reply to comment #11)
> I'm confused; is this a seamonkey or a firefox bug?

The product states Browser and NOT Firefox, so this a seamonkey bug and the bug
is still valid with a trunk build.
Product: Browser → Firefox
duh! nothing to see here, move along...
Product: Firefox → Browser
Product: Browser → Seamonkey
So, as it appears to me meaningful not to load with a selected folder the
easiest solution is to disable the new button until a folder is selected.
Keywords: helpwanted
Attached patch fix (obsolete) — Splinter Review
Comment on attachment 170853 [details] [diff] [review]
fix

r=varga
Attachment #170853 - Flags: review+
When I try to get in to a "nothing selected" state either using the steps in
comment 10 or by other methods the "New Folder" button is always disabled...
(In reply to comment #17)
> When I try to get in to a "nothing selected" state either using the steps in
> comment 10 or by other methods the "New Folder" button is always disabled...

Then use the steps from Comment 0 ;-). These still work and the patch in this
bug is also about fixing the issue in Comment 0. Note Comment 10 was about
testing something similar in Firefox, not in Mozilla.
Oh, in that case the patch is wrong; if any folder in that dialog should be
preselected, it should be the one "Set as New Bookmark Folder".
Attached patch patch-2 (obsolete) — Splinter Review
Is this better?
Attachment #170853 - Attachment is obsolete: true
Attachment #170976 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #170976 - Flags: review?(jan)
*** Bug 278854 has been marked as a duplicate of this bug. ***
*** Bug 279221 has been marked as a duplicate of this bug. ***
Summary: New Folder in the Add Bookmark dialog doesn't work → New Folder in the File Bookmark dialog doesn't work [error in addBookmark.js :: createNewFolder]
Attachment #170976 - Attachment is obsolete: true
Attachment #170976 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #170976 - Flags: review?(jan)
Attached patch patch 3Splinter Review
(In reply to comment #19)
> Oh, in that case the patch is wrong; if any folder in that dialog should be
> preselected, it should be the one "Set as New Bookmark Folder".

This bug was fixed in Bug 248958 the same way that I proposed with my first
patch. You pointed out that it was wrong. This third patch is the same that the
second, but updated to apply with current trunk.
Attachment #186006 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #186006 - Flags: review?(neil.parkwaycc.co.uk)
Comment on attachment 186006 [details] [diff] [review]
patch 3

Exactly, thanks.
Attachment #186006 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #186006 - Flags: superreview+
Attachment #186006 - Flags: review?(neil.parkwaycc.co.uk)
Attachment #186006 - Flags: review+
--> Florian
Assignee: p_ch → f.qu
Keywords: helpwanted
Whiteboard: [checkin needed]
Attachment #186006 - Flags: approval1.8b3?
Attachment #186006 - Flags: approval1.8b3? → approval1.8b3+
Fix checked in.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Verified FIXED using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2)
Gecko/20050628 Seamonkey trunk on Windows XP.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: