Bug 477142 - Search bar next to address bar: Icon of new default search engine is not displayed there + text "DuckDuckGo" (name of previous default search engine) is displayed there + searches in address bar get executed using DuckDuckGo
Summary: Search bar next to address bar: Icon of new default search engine is not disp...
Status: REPORTED
Alias: None
Product: Falkon
Classification: Applications
Component: general (show other bugs)
Version: 24.01.75
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: David Rosca
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-17 13:59 UTC by J. R.
Modified: 2023-11-27 16:27 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description J. R. 2023-11-17 13:59:36 UTC
After a fresh installation of Falkon, the standard search engine in Falkon is DuckDuckGo in the search bar next to the address bar at the top of the Falkon browser. An icon at the left edge of the search bar indicates that DuckDuckGo is set as the currently active search engine.

I defined an additional search engine via menu Edit > Preferences > Other > Manage search engines: I added the search engine Startpage.com to the list of existing search engines with the following parameters:

Name: StartPage
URL: https://startpage.com/do/search
Post data: query=%s&cat=web&language=english
Shortcut: sp

Startpage.com has a unique icon which is shown there.

In the list of all available search engines in the "Manage Search Engines - Falkon" window the Startpage.com entry has been set by myself as the default search engine and has been moved to the first (top) position of all search engines in that list.

But when you close the "Manage Search Engines - Falkon" window, the search bar at the top of the main Falkon window does not show the icon for the new default search engine Startpage.com, but still the icon for DuckDuckGo plus the text "DuckDuckgo" inside the address bar. And if you type a search term into the address bar and then execute an Internet search, your search gets applied using the DuckDuckGo search engine. 

This behavior continues to exist if you close Falkon and start Falkon again.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Comment 1 J. R. 2023-11-18 06:39:07 UTC
The above-mentioned URL parameter in the Startpage.com settings which defines a new search engine entry via menu Edit > Preferences > Other > Manage search engines has a wrong value. With this value searches using the Startpage search engine entry in the search bar do not work. I cannot remember how I generated the wrong value for the URL parameter which I specified above. Is this wrong value maybe a preset value by Falkon? 

These values for the parameters for a Startpage search engine entry work, i. e. searches with Startpage through the search bar execute successful searches by Startpage.com:

Name: StartPage
URL: https://www.startpage.com/sp/search?query=%s
Post data:
Shortcut: sp
Comment 2 J. R. 2023-11-19 09:32:26 UTC
The search URL which I specified in my last comment is taken from this URL:

https://support.startpage.com/hc/en-us/articles/4520913488148-Search-strings-adding-Startpage-to-unsupported-web-browsers

An extra information to the initial description of the behavior described in the first post in this bug report:

The behavior as described above occurs even if the option "Search with Default Engine" is activated in menu Edit > Preferences > Tabs > Adress Bar.

Note here that the pattern "Search with Default Engine" is a quote from the Falkon GUI, this pattern should get corrected to "Search with default search engine" - the word "search" should be added, and the pattern "default search engine" does not require capital letters at the beginning of each word in it.
Comment 3 J. R. 2023-11-27 16:27:04 UTC
(In reply to Jens Radloff from comment #1)

> These values for the parameters for a Startpage search engine entry work, i.
> e. searches with Startpage through the search bar execute successful
> searches by Startpage.com:
> 
> Name: StartPage
> URL: https://www.startpage.com/sp/search?query=%s
> Post data:
> Shortcut: sp

Having created a completely new git clone of the Falkon source code in another local directory some days ago, then having compiled and installed this clone, I can confirm that the search URL "https://startpage.com/do/search" in the preferences for the Startpage search engine in the Preferences dialog > Other > Manage search engines/Search Engines Manager > Edit button > "Url" field is the search URL that is predefined in the Falkon source code. This predefined search URL results in non-working searches if StartPage is used for searching via the Search Bar.

Note that in the Search Engines Manager > Edit window for StartPage the field "Post Data" contains the string "query=%s&cat=web&language=english" as predefined by the current Falkon source code. 

Using this string in the "Post Data" field in connection with the search URL "https://www.startpage.com/sp/search?query=%s" (which itself works, see above) in the "Url" field of the Startpage settings results in erroneous search results when Startpage is used by using the Search Bar for searching for any string. 

I typed "duck" into the Search Bar (before that I selected Startpage as the search engine to be used for the search by selecting its corresponding icon left to the Search Bar), pressed ENTER, then Startpage showed the results of this search, and it appears that at the top of this result page the string "%s" is shown in the Start Page search field at the top of the result page. Thus Startpage had applied a search for the string "%s".

That means that the predefined string "https://www.startpage.com/sp/search?query=%s"  in the "Post Data" field in the settings for Startpage in the Search Engines Manager works improperly. But if you leave the "Post Data" field empty, then searches with Startpage via the Search Bar results in correct search result web pages.