Closed Bug 421763 Opened 12 years ago Closed 11 years ago

bookmarks import and restore only allow files named .html and .json

Categories

(Firefox :: Bookmarks & History, defect, minor)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
Firefox 3.6a1

People

(Reporter: fahlmanc_ca, Assigned: jason)

Details

(Keywords: fixed1.9.1)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b5pre) Gecko/2008030804 Minefield/3.0b5pre
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b5pre) Gecko/2008030804 Minefield/3.0b5pre

When you choose to restore bookmarks from a bookmarks backup, it displays and lets you to select only files that have a particular extension, html.

You should be able to choose to display and select files that are not html. Although naming the files *.html is the normal way, and a good default to have, why shouldn't you be able to name your backups however you'd like?

--

Reproducible: Always

Steps to Reproduce:
1.Open the Library via Organize Bookmarks in the Bookmarks menu
2.From Import and Backup, choose Restore --> Choose file.
3.A dialogue pops up, and it (sensibly) displays files with the suffix .html in selected directories
4.There is a box that allows you to choose what types of file are shown, but it less sensibly allows only one choice, html.
Actual Results:  
You can't choose your bookmarks backup if it is not named *.html

Expected Results:  
Allow you to choose a backup with any kind of name or suffix.

The workaround is to rename your files as needed.
Component: Bookmarks → Places
QA Contact: bookmarks → places
Version: unspecified → Trunk
(In reply to comment #0)
> why shouldn't you be able to name your backups however you'd like?

because the standard format is html, the file is an html file, you will be able to open it with other programs/editor that accept html files, so why you would want to change that?
I am not angling for mozilla to be able to read files other than html files, and clearly wrote that, Marco. I simply want it to not prevent you naming your html backups however you want. An extension does not a file make.
The bookmarks engine has since been changed to JSON. The above still applies, just replacing .html with .json.

Confirmed
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9pre) Gecko/2008041104 Minefield/3.0pre

Kubuntu Hardy Alpha - KDE4.03

I tend to name backups with the .backup extension, regardless of file type. This is definitely a bug to consider.

I vote to move forward - CONFIRMED.
Added an "All Files" filter option to the file chooser interface. The "JSON" option is still the default. I would guess that most users are going to use the default file extension so I don't believe it is necessary to set the "All Files" filter as default.

Built and tested on Ubuntu Hardy amd64 with Gnome 2.22.1
Attachment #315453 - Flags: superreview?(dietrich)
Attachment #315453 - Flags: review?(dietrich)
Wouldn't this give incomprehensible problems if new Firefox 3 users want to restore an old bookmarks.html file? I assume Firefox will do nothing in that case because it only can restore the .json format. 
I agree, users will assume that .html can be restored when it likely cannot.
Should the lack of functionality to restore an HTML bookmark backup be addressed in another bug report?

Regardless of whether you can restore HTML files or not, users should be allowed to restore a JSON file without a .JSON extension.

If you attempt to restore an HTML backup file, the current interface pops an error indicating that the file is of an invalid format.
(In reply to comment #7)
> Should the lack of functionality to restore an HTML bookmark backup be
> addressed in another bug report?

do you mean the ability to import a bookmarks HTML file and have it completely replace the existing bookmark collection?

if so, yes please file a new bug for that.

let's use this bug for removing the file extension restriction, whether html or json.

> 
> Regardless of whether you can restore HTML files or not, users should be
> allowed to restore a JSON file without a .JSON extension.
> 
> If you attempt to restore an HTML backup file, the current interface pops an
> error indicating that the file is of an invalid format.
> 

agreed. the Restore menu option should only show json files i think. however, if the user chooses a file via the file picker, we should trust their choice and attempt to process the file.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Hardware: PC → All
Summary: bookmarks restore only allows you to consider files named .html → bookmarks import and restore only allow files named .html and .json
Comment on attachment 315453 [details] [diff] [review]
Adds "All Files" filter option when choosing "Bookmark Restore" file

r=me, thanks
Attachment #315453 - Flags: superreview?(dietrich)
Attachment #315453 - Flags: review?(dietrich)
Attachment #315453 - Flags: review+
I made a hg diff of this change. So we can checkin? (checkin-needed)
Attachment #374160 - Flags: review+
http://hg.mozilla.org/mozilla-central/rev/82d9e20dd56d
Assignee: nobody → jason
Status: NEW → RESOLVED
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.6a1
Comment on attachment 374160 [details] [diff] [review]
hg patch (ready for checkin)

really minor and no risk change, adding full wildcard to open file dialog.
Attachment #374160 - Flags: approval1.9.1?
Attachment #374160 - Flags: approval1.9.1? → approval1.9.1+
Keywords: checkin-needed
Not sure what happened, but I'm seeing a different between trunk and Shiretoko:

Trunk:

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2a1pre) Gecko/20090505 Minefield/3.6a1pre ID:20090505031205

JSON and All Files options available

and

Shiretoko

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b5pre) Gecko/20090505 Shiretoko/3.5b5pre ID:20090505031155

JSON option only available
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.