cancel
Showing results for 
Search instead for 
Did you mean: 

Opensearch with a distant wiki

bbougon
Champ in-the-making
Champ in-the-making
Hi,

I am trying to add / configure an new openSearch engine to Alfresco in order to query a distant mediawiki.

I did customize the "web-scripts-config-custom.xml" that looks like below :


<alfresco-config>

   <config evaluator="string-compare" condition="OpenSearch">
      <opensearch>

         <engines>
            <engine label="WIKI CVF" proxy="remote">
               <url type="application/atom+xml">[WIKI_HOST]/api.php?action=opensearch&amp;search={searchTerms}&amp;limit=10&amp;namespace=0&amp;format=xmlfm</url>
            </engine>
         </engines>

      </opensearch>
   </config>

</alfresco-config>

While launching a query specifying this new engine, I do have this error poped-up :


An error occurred:
Cannot read property 'documentElement' of null


While looking at the results sent back by the wiki, I may see this :


1 requests  ❘  1.08KB transferred
atom
/wcservice/api/search/engine/remote

HeadersContentCookiesTiming

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <title>MediaWiki API Result</title>
</head>
<body>
<br/>
<small>
You are looking at the HTML representation of the XML format.<br/>
HTML is good for debugging, but probably is not suitable for your application.<br/>
See <a href='http://www.mediawiki.org/wiki/API'>complete documentation</a>, or
<a href='/api.php'>API help</a> for more information.
</small>
<pre>
<span style="color:blue;">&lt;?xml version=&quot;1.0&quot;?&gt;</span>
<span style="color:blue;">&lt;SearchSuggestion version=&quot;2.0&quot; xmlns=&quot;<a href="http://opensearch.org/searchsuggest2">http://opensearch.org/searchsuggest2</a>&quot;&gt;</span>
  <span style="color:blue;">&lt;Query xml:space=&quot;preserve&quot;&gt;</span>SIE<span style="color:blue;">&lt;/Query&gt;</span>
  <span style="color:blue;">&lt;Section&gt;</span>
    <span style="color:blue;">&lt;Item&gt;</span>
      <span style="color:blue;">&lt;Text xml:space=&quot;preserve&quot;&gt;</span>SIE-formation<span style="color:blue;">&lt;/Text&gt;</span>
      <span style="color:blue;">&lt;Description xml:space=&quot;preserve&quot;&gt;</span>Les formations SIE:<span style="color:blue;">&lt;/Description&gt;</span>
      <span style="color:blue;">&lt;Url xml:space=&quot;preserve&quot;&gt;</span><a href="[WIKI_HOST]/index.php/SIE-formation">[WIKI_HOST]/index.php/SIE-formation</a><span style="color:blue;">&lt;/Url&gt;</span>
    <span style="color:blue;">&lt;/Item&gt;</span>
    <span style="color:blue;">&lt;Item&gt;</span>
      <span style="color:blue;">&lt;Text xml:space=&quot;preserve&quot;&gt;</span>SIE-home<span style="color:blue;">&lt;/Text&gt;</span>
      <span style="color:blue;">&lt;Description xml:space=&quot;preserve&quot;&gt;</span>Accueil &amp;gt; SIE-Home<span style="color:blue;">&lt;/Description&gt;</span>
      <span style="color:blue;">&lt;Url xml:space=&quot;preserve&quot;&gt;</span><a href="[WIKI_HOST]/index.php/SIE-home">[WIKI_HOST]/index.php/SIE-home</a><span style="color:blue;">&lt;/Url&gt;</span>



</pre>
</body>
</html>
<!– Served in 0.243 secs. –>

I don't know what to think, is that the real response sent back by the wiki (meaning html format instead of xml as specified in the request)? Or does Alfresco do not understand the response?

thank you by advance

Bertrand
1 REPLY 1

bbougon
Champ in-the-making
Champ in-the-making
Hi,

I did solve the problem with the search engine, I do not have any error thrown from javascript. But now I do not have any results (looking the console I see some results).

any ideas?

thx
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.