Closed Bug 363069 Opened 18 years ago Closed 5 years ago

error_duplicate_engine_msg is confusing when the search engine is a hidden default engine

Categories

(Firefox :: Search, defect)

defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 1208768

People

(Reporter: mail, Unassigned)

References

()

Details

I keep getting comments like the following in the Mycroft judging system:

2006-11-15 10:59:06
207.58.xxx.xxx
broken
Unknown	can't install it...claims Yahoo already exists...and it doesn't
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0

If the decision was something more like:

if (ss.getEngineByName(aEngine.name)) {
  if (not a hidden default engine)
    onError("error_duplicate_engine_msg", "error_invalid_engine_title");
  else
    Tell the user about restoring defaults or something...

I would hope to get less of these.

The alternative is just to make sure that 'my' names aren't incompatible with the default names but that seems a rather backwards way of doing it.
This issue is visible when i try to add search engine by gpo policy (firefox esr). Maybe the right decision could be to set engine visible in addEngineWithDetails function :

if (existingEngine) {
  if (params.extensionID &&
      existingEngine._loadPath.startsWith(`jar:[profile]/extensions/${params.extensionID}`)) {
    // This is a legacy extension engine that needs to be migrated to WebExtensions.
    isCurrent = this.currentEngine == existingEngine;
    this.removeEngine(existingEngine);
  } else if (existingEngine.hidden && existingEngine._isDefault) {
    existingEngine.hidden = false;
  } else {
    FAIL("An engine with that name already exists!", Cr.NS_ERROR_FILE_ALREADY_EXISTS);
  }
}

This is effectively the same issue as bug 1208768, but with more technical detail, I think we can just dupe back to that bug as it is clearer as to what it is about.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.