Last Comment Bug 341283 - Can't install a microsummary generator if it has a non-absolute URL
: Can't install a microsummary generator if it has a non-absolute URL
Status: RESOLVED WONTFIX
[microsummaries-feature-removal]
:
Product: Firefox Graveyard
Classification: Graveyard
Component: Microsummaries (show other bugs)
: 2.0 Branch
: All All
: -- normal
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on: 610714
Blocks:
  Show dependency treegraph
 
Reported: 2006-06-12 12:39 PDT by Adam Guthrie
Modified: 2016-02-12 06:59 PST (History)
6 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
testcase.html (768 bytes, text/html)
2006-06-12 12:40 PDT, Adam Guthrie
no flags Details
testcase-generator.xml (434 bytes, application/xml)
2006-06-12 12:40 PDT, Adam Guthrie
no flags Details

Description Adam Guthrie 2006-06-12 12:39:32 PDT
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1a3) Gecko/20060612 BonEcho/2.0a3

Steps to reproduce:
1. Download the two testcase files to the same directory.
2. Open testcase.html and click the install microsummary link.
2. Then go to Bookmarks > Add Bookmark and open the dropdown. 

Results:
The microsummary is not displayed in the dropdown.

Expected results:
Microsummary is available for use.

I'm also seeing the following error in the JS console:

Error: [Exception... "Component returned failure code: 0x804b000a [nsIIOService.newURI]"  nsresult: "0x804b000a (<unknown>)"  location: "JS frame :: file:///home/aguthrie/downloads/2006-06-12-04-mozilla1.8/components/nsSidebar.js :: anonymous :: line 185"  data: no]
Source File: file:///home/aguthrie/downloads/2006-06-12-04-mozilla1.8/components/nsSidebar.js
Line: 185

Myk had originally said he thought this had to do with file:/// URIs, but this happens when you upload stuff to a webserver, too.
Comment 1 Adam Guthrie 2006-06-12 12:40:03 PDT
Created attachment 225302 [details]
testcase.html
Comment 2 Adam Guthrie 2006-06-12 12:40:31 PDT
Created attachment 225303 [details]
testcase-generator.xml
Comment 3 Myk Melez [:myk] [@mykmelez] 2006-07-10 13:37:49 PDT
To fix this, we probably have to make the addMicrosummaryGenerator method of the sidebar component interpret such URLs relative to the base URI of the page calling that method.  It's unclear how complicated or significant a change that is, so targeting this to Firefox 3 for now, but if we get a fix in the beta2 timeframe, and it looks like something we could take in that release, I'll retarget.
Comment 4 Justin Dolske [:Dolske] 2006-09-01 18:29:11 PDT
The microsummary code in nsSidebar.js could probably just set the third arg of newURI() [to the page URI, instead of null], which looks like it should make relative URIs work.

I'm curious if the other sidebar services work with relative URIs...
Comment 5 :Gavin Sharp [email: gavin@gavinsharp.com] 2006-09-01 20:15:14 PDT
(In reply to comment #4)
> The microsummary code in nsSidebar.js could probably just set the third arg of
> newURI() [to the page URI, instead of null], which looks like it should make
> relative URIs work.

Except that nsSidebar.js has no way of knowing the "page URI". Bug 334875 provides such a way, it blocks some similar potential improvements to the search code (e.g. bug 340604).
Comment 6 Justin Dolske [:Dolske] 2006-09-05 16:26:41 PDT
Hmm, good point.

I've added a note to http://developer.mozilla.org/en/docs/Creating_a_Microsummary
Comment 7 Marco Bonardo [::mak] (Away 6-20 Aug) 2011-05-02 05:30:13 PDT
- BUGSPAM -
Wontfixing all Microsummaries bugs, since the feature has been removed from the core product and previous versions won't get further fixes for it.
If interested in supporting Microsummaries in your add-on, you're free to use our old microsummaries code and to search all previously open bugs by looking for [microsummaries-feature-removal] in the status whiteboard field.

Note You need to log in before you can comment on or make changes to this bug.