Wikipedia entry in search field won't work Topic is solved

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
Serpentine

Wikipedia entry in search field won't work

Unread post by Serpentine » 2018-06-11, 03:59

Hi,
I've got some problems with the wikipedia entry in the search field. I removed the standard entry (English), went to http://de.wikipedia.org and from the little icon left side in the search field I chose to add de.wikipedia.org. Result:
"Pale Moon konnte die Suchmaschine nicht herunterladen von: https://de.wikipedia.org/w/opensearch_desc.php"
(transl.: Pale Moon could not retrieve the search engine from...) This happened also before I installed german language pack. I have the same problem with http://fr.wikipedia.org and all the other seperate language-specific wikipedias.

Whereas from https://dict.leo.org I can install fr,en and de at the same time, resulting in three search entries, one for each language.

So fetched the corresponding xml-files from the wikipedias manually and put them to ~/.moonchild productions/pale moon/...default/searchplugins/de-wikipedia.xml and fr.wikipedia.xml, restarted the browser and -- nothing happened. Then I searched about:config for useful entries but didn't find the ticket. Only thing left was to restore the original search settings, tied to the english version of wikipedia.

I need all three entries to be present: french, english and german. Can you give me any suggestions, how I could realise this? I'm not afraid of editing some files manually, or change some config settings if necessary.

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: Wikipedia entry in search field won't work

Unread post by coffeebreak » 2018-06-11, 06:30

Same here, W7 x86, PM 27.9.2.

Trying to add either search plugin produces an error:

Code: Select all

Error: Error invoking addEngine install callback: [Exception... "JavaScript component does not have a method named: 
"onError"'JavaScript component does not have a method named: "onError"' when calling method: 
[nsISearchInstallCallback::onError]"  nsresult: "0x80570030 (NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED)"  
location: "JS frame :: resource://gre/components/nsSearchService.js :: SRCH_SVC_addEngine/engine._installCallback :: 
line 4274"  data: no] Source File: resource://gre/components/nsSearchService.js Line: 4276

But you can add them with an extension: Add to Search Bar. It worked just now for me.
Last edited by coffeebreak on 2018-06-11, 06:30, edited 1 time in total.

Serpentine

Re: Wikipedia entry in search field won't work

Unread post by Serpentine » 2018-06-12, 01:00

Thank you very much for this, coffeebreak. It looks fine and I'll give it a try later. What does all this mean?
This Pseudo-Static release provides users of Pale Moon a fully functional experence while we work with the developer to get Pale Moon officially supported. [...] BEFORE YOU INSTALL PLEASE REMOVE THE MAIN-LINE VERSION AS THEY WILL CONFLICT
I don't understand anything. Pseudo-Static? Is it inofficial, i.e. that kind extension this page warns of: https://addons.palemoon.org/incompatible/? And finally: What exactly do I have to remove?
This was so ambiguous to me that I decided not to install, until I come to know more about it.
In the meantime I tried to correct the xml-files the browser gets from the language specific wikipedias, using the original wikipedia.xml from /opt/palemoon/browser/searchplugins/ as my draft. The result (french language for example) is:

Code: Select all

<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>Wikipédia (fr)</ShortName>
<Description>Wikipédia, L'encyclopédie libre</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">data:image/x-icon;base64,AAABAAIAEBAAAAAAAAA4AQAAJgAAACAgAAAAAAAAJAMAAGQBAACJUE5HDQoaCgAAAA1JSERSAAAAEAAAABAIBgAAAB/z/2EAAAEFSURBVDjLxZPRDYJAEESJoQjpgBoM/9IBtoAl4KcUQQlSAjYgJWAH0gPmyNtkzEEuxkQTPzawc3Ozc3MQTc/JfVPR/wW6a+eKQ+Hyfe54B2wvrfXVqXLDfTCMd3j0VHksrTcH9bl2aZq+BCgEwCCPj9E4TdPYGj0C9CYAKdkmBrIIxiIYbvpbb2sSl8AiA+ywAbJE5YLpCImLU/WRDyIAWRgu4k1s4v50ODru4haYSCk4ntkuM0wcMAINXiPKTJQ9CfgB40phBr8DyFjGKkKEhYhCY4iCDgpAYAM2EZBlhJnsZxQUYBNkSkfBvjDd0ttPeR0mxREQ+OhfYOJ6EmL+l/qzn2kGli9cAF3BOfkAAAAASUVORK5CYIKJUE5HDQoaCgAAAA1JSERSAAAAIAAAACAIBgAAAHN6evQAAAIKSURBVFjD7ZdBSgNRDIYLguAB7FLwAkXwBl0JgiDYjQcY8ARduBJKu3I5C0EoWDxAT9AL9AK9QBeCIHQlCM/3DZOSmeZNZ2r1bQyEGV7yXv7kJZlJq6XIOXfs+crzwPPTnvnR863n05ZFufDD/T595Q4eauM37u/pWYwfeX53cegcABcuHg0AkEQE8AKAu4gAXv8BrAEMh0PXbrddt9t1vV4v406nk62laeqm02n2LjKYIuK5WCyyfeiLDF32yLn6TJ5mBFarlev3+9nBMMqsabkYhmezWcEd2ctTE/tYBwhgt14BhtmAV2VaLpdrAHioCW+VdwWy9IMAUBQjJcQFTwGqvcTD+Xy+oc8askZJyAYrnKEokCeWLpQkSSZvBIANYgSDVVEQQJaeyHQu1QIgiQNb6AmrTtaQ9+RFSLa1D4iXgfsrVITloeSFFZlaAEjAUMaXo2DJWQtVRe1OKF5aJUkf0NdglXO5VzQGoI2USwwD3LEl590CtdO3QBoT5WSFV+Q63Oha17ITgMlkslGSGBWPdeNiDR2SL1B6zQFINmOAkFOW5eTSURCdvX6OdUlapaWjsKX0dgOg26/VWHSUKhrPz35ISKwq76R9Wx+kKgC1f0o5mISsypUG3kPj2L/lDzKYvEUwzoh2JtPRdQQAo1jD6afne88H1oTMeH6ZK+x7PB/lQ/CJtvkNEgDh1dr/bVYAAAAASUVORK5CYII=</Image>
<Url type="application/x-suggestions+json" method="GET" template="https://fr.wikipedia.org/w/api.php">
  <Param name="action" value="opensearch"/>
  <Param name="search" value="{searchTerms}"/>
</Url>
<Url type="text/html" method="GET" template="https://fr.wikipedia.org/w/index.php?title=Sp%C3%A9cial:Recherche&">
  <Param name="search" value="{searchTerms}"/>
</Url>
<SearchForm>https://fr.wikipedia.org/wiki/Sp%C3%A9cial:Recherche</SearchForm>
</SearchPlugin>
copy this code into a new file named e.g. fr-wilipedia.xml in your ~/.moonchild productions/pale moon/...default/searchplugins/ folder and restart the browser - voila, this time it works. Now it would be interesting, what is wrong with the files delivered from wikipedia. They look like this:

Code: Select all

<?xml version="1.0"?><OpenSearchDescription xmlns="http://www.opensearch.org/Specifications/OpenSearch/1.1" xmlns:moz="https://www.mozilla.org/2006/browser/search/"><ShortName>Wikipédia (fr)</ShortName><Description>Wikipédia (fr)</Description><Image height="16" width="16" type="image/x-icon">https://fr.wikipedia.org/static/favicon/wikipedia.ico</Image><Url type="text/html" method="get" template="https://fr.wikipedia.org/w/index.php?title=Sp%C3%A9cial:Recherche&search={searchTerms}" /><Url type="application/x-suggestions+json" method="get" template="https://fr.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}&namespace=0" /><Url type="application/x-suggestions+xml" method="get" template="https://fr.wikipedia.org/w/api.php?action=opensearch&format=xml&search={searchTerms}&namespace=0" /><moz:SearchForm>https://fr.wikipedia.org/wiki/Sp%C3%A9cial:Recherche</moz:SearchForm></OpenSearchDescription>
Since it seems to be valid open search code it should work properly in pale moon, shouldn't it? What exactly is the problem which prevents the browser from accept the file when clicking on the offered add search engine entry from the search menu?

Btw, this way you can add every wikipedia-language parallel to each other. Look careful for the changes I made to the to the file pale moon brings with itself. Here is the diff:

Code: Select all

6,7c6,7
< <ShortName>Wikipedia (en)</ShortName>
< <Description>Wikipedia, the free encyclopedia</Description>
---
> <ShortName>Wikipédia (fr)</ShortName>
> <Description>Wikipédia, L'encyclopédie libre</Description>
10c10
< <Url type="application/x-suggestions+json" method="GET" template="http://en.wikipedia.org/w/api.php">
---
> <Url type="application/x-suggestions+json" method="GET" template="https://fr.wikipedia.org/w/api.php">
14c14
< <Url type="text/html" method="GET" template="http://en.wikipedia.org/wiki/Special:Search">
---
> <Url type="text/html" method="GET" template="https://fr.wikipedia.org/w/index.php?title=Sp%C3%A9cial:Recherche&">
17c17
< <SearchForm>http://en.wikipedia.org/wiki/Special:Search</SearchForm>
---
> <SearchForm>https://fr.wikipedia.org/wiki/Sp%C3%A9cial:Recherche</SearchForm>
All you have to do is to copy the appropriate snippets from the file you received from your language specific wikipedia and replace them in the draft before saving the file.


P.S. I think I have to amend that I'm using pale moon on linux, so the folder names will be different in a windows system.
Last edited by Serpentine on 2018-06-12, 05:30, edited 2 times in total.

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: Wikipedia entry in search field won't work

Unread post by coffeebreak » 2018-06-12, 10:46

Serpentine wrote:I don't understand anything. Pseudo-Static?

Search is your friend here: pseudo-static.

See this post: What is a pseudo-static add-on?

Serpentine

Re: Wikipedia entry in search field won't work

Unread post by Serpentine » 2018-06-16, 00:30

Many thanks again, coffeebreak,

I have taken some time to read all the background info you pointed me to. That made things clear to me and now I know why the delivered search-bar couldn't work with plugins which don't have the appropriate format handed over from some sites.

So I decided to give some contribution back to this community and rewrite the plugins for the language specific wikipedias at least for those languages pale moon has language-packs for, so they could be placed in here:https://addons.palemoon.org/search-plugins/, since I didn't find anybody in charge for the search-plugins at wikipedia project who could have amended the required additions for palemoon browser in the xml-files directly on their site.

But right now something very strange happened, which I don't know what to think about: When I just tested the newly rewritten xml-file for hungarian language, I got the message in the editor, that the files had been changed on the hard-drive by another program, I think it must have been palemoon itself (I worked directly in the ~/moonchild productions/.../searchplugins subfolder). The magically replaced files look like this now:

Code: Select all

<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
<os:ShortName>Wikipedia (sv)</os:ShortName>
<os:Description>Wikipedia (sv)</os:Description>
<os:InputEncoding>UTF-8</os:InputEncoding>
<os:Image width="16" height="16">data:image/x-icon;base64,AAABAAMAMDAQAAEABABoBgAANgAAACAgEAABAAQA6AIAAJ4GAAAQEBAAAQAEACgBAACGCQAAKAAAADAAAABgAAAAAQAEAAAAAAAABgAAAAAAAAAAAAA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AMAAAAAAAAAAAAAAABAAAAAAAAAAAQEBABcXFwAnJycAOzs7AElJSQBpaWkAeXl5AIaGhgCVlZUApqamALOzswDMzMwA2dnZAObm5gD+/v4AAAAAAP/u7u7u7u7//u7u7u7u7u/u7uzu7t7u7u7u4Y7lTu7u7u6QTtA77u7u7iaoctXu7u7qDOQZ5d7u7uRO5R7rbu7uv77iLu5O7u5D7pGn7pju7QrtKOTe4+6z+OT40z2RTO7u7u7u7u7u7u7u7u7u7u7+7u7u7u7u7//u7u7u7u7/wAMAD4ABAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA+AAQAPwAMADw==</os:Image>
<SearchForm>https://sv.wikipedia.org/wiki/Special:S%C3%B6k</SearchForm>
<os:Url type="text/html" method="GET" template="https://sv.wikipedia.org/w/index.php?title=Special:S%C3%B6k&search={searchTerms}" resultDomain="sv.wikipedia.org">
</os:Url><os:Url type="application/x-suggestions+json" method="GET" template="https://sv.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}&namespace=0" resultDomain="sv.wikipedia.org">
</os:Url><os:Url type="application/x-suggestions+xml" method="GET" template="https://sv.wikipedia.org/w/api.php?action=opensearch&format=xml&search={searchTerms}&namespace=0" resultDomain="sv.wikipedia.org">
</os:Url>
</SearchPlugin>
This is completely changed xml-code! Where does it come from all of a sudden? And the even more strange thing is: Now the add search engine entry for language specific wikipedias in the search bar seems to be working flawlessly now (haven't checked all of them) . And no, I have *not* upgraded to 27.9.3 until now, I'm still on 27.9.2. The behaviour just changed during work, maybe after restarting the browser, what I did quite often while testing the rewriten xml files step by step, trying to identify the really necessary changes. But: how is this change of code possible at all? Wikipedia itself doesn't seem to have renewed anything: the link in the head section of their pages still points to

Code: Select all

<link rel="search" type="application/opensearchdescription+xml" href="/w/opensearch_desc.php" title="Wikipedia (nb)"/>
and downloading these xml files results in exactly the old type of files I was just rewriting when the code change happened. So what is going on here? I mean, it's great it's working now, but... I'd really like to come to know why.
Is palemoon browser able to replace code after installation without notice? Or do I have missed something? I am completely confused by now. When this queer thing is resolved, I'd tend to mark this thread as settled, since the problem I originally addressed seems to have vanished into thin air.

Serpentine

Re: Wikipedia entry in search field won't work

Unread post by Serpentine » 2018-06-21, 09:51

Or do I have missed something?
Yes, there was something I was not aware of: There is a checkbox in advanced settings of palemoon which allows search engines to get updated automatically, even if the browser doesn't update itself. So there is nothing strange in the behaviour I had noticed, this change of xml-code happened exactly as intended.

It looks like there is no need for the xml-files I had created anymore. So I will not upload them.

Many thanks to all of you, especially to coffeebreak.

Locked