Closed Bug 1666844 Opened 5 years ago Closed 5 years ago

Clean up MozParam handling for search engines

Categories

(Firefox :: Search, task, P2)

task
Points:
2

Tracking

()

RESOLVED FIXED
83 Branch
Iteration:
83.1 - Sept 21 - Oct 4
Tracking Status
firefox83 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(1 file)

MozParams are only supported for app-provided engines.

However, we still have code in OpenSearchEngine.jsm to support processing of those entries (for app-provided engines), even though OpenSearch engines can't be app-provided.

I also noticed that when loading from the search settings, we allow loading of the MozParams. We should also remove that handling as app-provided engines no longer store their settings in the file.

Blocks: 1665938
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/29339117a47e Clean up MozParam handling for search engines. r=daleharvey
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch

I used the "purpose": "keyword" parameter to create a custom search engine that behaved differently when used from the address bar vs other places like the right click menu. removal of support for this breaks that functionality.

reference: https://www.reddit.com/r/firefox/comments/jwbj3j/firefox_search_file_format_specs_or_documentation/

a "keyword search" from the address bar would return this search query:

https://www.example.com/?param1=1&param2=2&q=SEARCHTERM

while a non-keyword search would return this search query

https://www.example.com/?q=SEARCHTERM

this was a very useful feature for custom search engines. i can make it behave in different ways depending on if the search was done from the address bar or not.

please re-add support for this or a different way to recreate the same functionality

it would also be great if all of this is actually documented

thanks!!

Hi,

(In reply to softbored from comment #4)

I used the "purpose": "keyword" parameter to create a custom search engine that behaved differently when used from the address bar vs other places like the right click menu. removal of support for this breaks that functionality.

I'm sorry we have broken you use case. I would like to point out that we have never supported changing the parameters via the settings file even though it has been possible. Additionally, MozParams has always been intended for application provided engines only - I believe this is because it gives more precise details about behaviour that we only allow in certain circumstances (I don't know the precise history/details here, but this is my general understanding)

As you'll have observed, we are currently also reducing the amount of data written to the settings file. This is to reduce the amount we're reading/writing, but also to help simplify it and avoid third parties changing things that they shouldn't be.

this was a very useful feature for custom search engines. i can make it behave in different ways depending on if the search was done from the address bar or not.

You can achieve similar functionality with different search engines with different keywords, though obviously you would need to remember which to use when - but I would expect you to be doing some of that anyway by remembering the location you need to search from.

Note, we are also working towards having UI for adding custom search engines.

please re-add support for this or a different way to recreate the same functionality

Sorry, but we won't be re-adding this for the reasons stated above, additionally yours is the first case that I've heard of using it in this specific way.

it would also be great if all of this is actually documented

Whilst we should probably have developer documentation, as stated above it is not intended for the user to change the settings behind the scenes.

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

Attachment

General

Created:
Updated:
Size: