Page MenuHomePhabricator

OpenSearch description file not understood by Firefox
Closed, ResolvedPublic

Description

When I try to import Wikidata or German Wikipedia search into Firefox, I get an error window:

Firefox Developer Edition could not install the search engine from: https://de.wikipedia.org/w/opensearch_desc.php

The Browser Console (Ctrl+Shift+J) reveals a slightly more informative error…

Invalid search plugin due to namespace not matching.

… from this code location: [nsSearchService.js, line 1809](https://dxr.mozilla.org/mozilla-central/rev/cec4a3cecc29ff97860198969b6fdff24b9e93bb/toolkit/components/search/nsSearchService.js#1760-1784).

It looks like Firefox only accepts the following namespaces (source):

const OPENSEARCH_NS_10  = "http://a9.com/-/spec/opensearch/1.0/";
const OPENSEARCH_NS_11  = "http://a9.com/-/spec/opensearch/1.1/";

// Although the specification at http://opensearch.a9.com/spec/1.1/description/
// gives the namespace names defined above, many existing OpenSearch engines
// are using the following versions.  We therefore allow either.
const OPENSEARCH_NAMESPACES = [
  OPENSEARCH_NS_11, OPENSEARCH_NS_10,
  "http://a9.com/-/spec/opensearchdescription/1.1/",
  "http://a9.com/-/spec/opensearchdescription/1.0/"
];

In I2c261cd654, we switched from what Firefox calls OPENSEARCH_NS_11 to a custom namespace, http://www.opensearch.org/Specifications/OpenSearch/1.1, which is not recognized by Firefox, which is why the search engine no longer works.

Is that new namespace part of any specification? (The version linked from that namespace URL itself still uses the original namespace.) If yes, I suppose we should file a bug in Mozilla’s Bugzilla to get it added to their list, otherwise we should revert our change.

Event Timeline

Change 438051 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/core@master] Restore original OpenSearch namespaces

https://gerrit.wikimedia.org/r/438051

Change 438051 merged by jenkins-bot:
[mediawiki/core@master] Restore original OpenSearch namespaces

https://gerrit.wikimedia.org/r/438051

Lucas_Werkmeister_WMDE claimed this task.

OpenSearch is working again on Wikidata, so I think we can close this. (dewiki and frwiki are in group2 and will only get the fix later today, assuming the train proceeds without problems.)

Vvjjkkii renamed this task from OpenSearch description file not understood by Firefox to 0gbaaaaaaa.Jul 1 2018, 1:05 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii removed Lucas_Werkmeister_WMDE as the assignee of this task.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: gerritbot, Aklapper.
CommunityTechBot renamed this task from 0gbaaaaaaa to OpenSearch description file not understood by Firefox.Jul 2 2018, 3:10 PM
CommunityTechBot closed this task as Resolved.
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added subscribers: gerritbot, Aklapper.