Closed Bug 404373 Opened 17 years ago Closed 16 years ago

Implement opensearch support in search engines page

Categories

(addons.mozilla.org Graveyard :: Search Plugins, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: morgamic, Assigned: clouserw)

Details

Attachments

(2 obsolete files)

The preferred format for search plugins is opensearch format (xml) but existing plugins use the old Fx 1.5 style (.src).  Right now if we install a new plugin that is opensearch compliant it breaks, since AMO attempts to deliver it as .src.

There is an existing component (controllers/components/opensearch.php) to assist with this, and the larger issue is decrementing .src support in favor of opensearch.

For now, we should aim to allow opensearch plugins to work correctly along with .src files.  In the future we can revisit disabling .src support altogether.
So this is pretty important, and we proposed to eliminate support for .src files and moving wholesale to .xml opensearch format.
Assignee: nobody → morgamic
Assignee: morgamic → clouserw
(In reply to comment #1)
> So this is pretty important, and we proposed to eliminate support for .src
> files and moving wholesale to .xml opensearch format.
> 

Does this mean we should no longer support .src or are we still aiming to support both?
We talked about this in Nov. and we agreed that we should stop supporting .src since the clients that support it are EOL'd.
(In reply to comment #3)
> We talked about this in Nov. and we agreed that we should stop supporting .src
> since the clients that support it are EOL'd.
> 

Was this decision ever made public? 
My concern is that I don't think we've said anything publicly (like the blog or newsgroups).  We should put in a reasonable effort to notify the current search engine authors and give them ample time to send us a replacement search engine.  Otherwise we're going to stop supporting the sherlock format and we'll end up with an empty page.

(Of course, if we finish bug 409076 they could upload the files themselves, but it looks like that bug isn't slated for 3.2)
Attached patch Is this all? (obsolete) — Splinter Review
I removed '.src' from the allowable extensions and changed the install trigger to the opensearch style.  Seems to work for me.
Attachment #296436 - Flags: review?
Attachment #296436 - Flags: review? → review?(fligtar)
The check window.sidebar + window.sidebar.addSearchEngine check needs to change as well, or applications that support OpenSearch but not .src (like current builds of Camino) won't be able to use the links.
Keeping the following statement seems wrong:

  if ((typeof window.sidebar == "object") && (typeof 
    window.sidebar.addSearchEngine == "function")) { 

That should check for window.external instead.

http://developer.mozilla.org/en/docs/Adding_search_engines_from_web_pages
(Given the way Firefox supports window.sidebar and window.external, they are completely interchangeable - they both point to the same object. In fact you can use addSearchEngine to install both kinds of search plugins in Firefox -  http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/browser/components/sidebar/src/nsSidebar.js&rev=1.30&mark=181-183#172 explains how the method distinguishes them. It's generally recommended to stick with the "standard" methods that are consistent between us an IE, though, which explains why http://developer.mozilla.org/en/docs/Adding_search_engines_from_web_pages says what it does.)
Attached patch now with window.external (obsolete) — Splinter Review
Thanks for the link.  Updated the patch.
Attachment #296436 - Attachment is obsolete: true
Attachment #297436 - Flags: review?(fligtar)
Attachment #296436 - Flags: review?(fligtar)
Comment on attachment 297436 [details] [diff] [review]
now with window.external

Works for me.

We're waiting to check this in until most of the engines have been notified and updated, right?
Attachment #297436 - Flags: review?(fligtar) → review+
With the new design on AMO v3.2 search engines are now each getting a dedicated page like any other addon. Please consider adding a <link rel> type tag into the page header so that users can install those engines via the Firefox Search bar. The behavior is that Firefox would highlight in blue if that engine is not installed.

See http://developer.mozilla.org/en/docs/Creating_OpenSearch_plugins_for_Firefox#Autodiscovery_of_search_plugins. Apparently, you are allowed to publish more than one search engine for autodiscovery so we don't necessarily have to take out the current AMO Search autodiscovery that's there right now.

(In reply to comment #12)
> (From update of attachment 297436 [details] [diff] [review])
> Works for me.
> 
> We're waiting to check this in until most of the engines have been notified and
> updated, right?
> 

No one objected to the steps I spelled out in bug 409076#1 so I think that's the plan.
(In reply to comment #13)
> With the new design on AMO v3.2 search engines are now each getting a dedicated
> page like any other addon. Please consider adding a <link rel> type tag into
> the page header so that users can install those engines via the Firefox Search
> bar. The behavior is that Firefox would highlight in blue if that engine is not
> installed.
> 
> See
> http://developer.mozilla.org/en/docs/Creating_OpenSearch_plugins_for_Firefox#Autodiscovery_of_search_plugins.
> Apparently, you are allowed to publish more than one search engine for
> autodiscovery so we don't necessarily have to take out the current AMO Search
> autodiscovery that's there right now.
> 

This feels like it's own bug to me, so I filed Bug 413532.
I have just made the regular install buttons handle search engines correctly (bug 417726).

Please close this bug after you landed the developers side of things, clouserw. Thanks!
Comment on attachment 297436 [details] [diff] [review]
now with window.external

Making this obsolete since wenzel already put in most of the changes.  r10920 shows the 2 lines I changed for this bug.
Attachment #297436 - Attachment is obsolete: true
Developer side (removing .src support) has landed on trunk.  I think that means this is fixed.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: