Note that there are some explanatory texts on larger screens.

plurals
  1. POPerforming DokuWiki search with PHP XML-RPC
    primarykey
    data
    text
    <p>I have a simple service that wraps DokuWiki calls (<a href="https://www.dokuwiki.org/devel:xmlrpc#accessing_the_xml-rpc_interface" rel="nofollow">https://www.dokuwiki.org/devel:xmlrpc#accessing_the_xml-rpc_interface</a>) made via the PHP XML-RPC library. I am attempting to perform a DokuWiki search but cannot seem to get it it to work. Here is the relevant functionality in my service:</p> <pre><code>public function search($query) { echo $query . "\n"; // initialize the new message for the search method call $message = new xmlrpcmsg('dokuwiki.search'); $message-&gt;addParam(new xmlrpcval($query, "string")); // return message results based on XMLRPC server response return $this-&gt;getResults( $this-&gt;_client-&gt;send($message) ); } private function getResults($response) { if( !$response-&gt;faultCode() ) { return $response-&gt;value(); } throw new Exception( $response-&gt;faultString() ); } </code></pre> <p>My client code is making search according to the query syntax (outlined here <a href="https://www.dokuwiki.org/search" rel="nofollow">https://www.dokuwiki.org/search</a>):</p> <pre><code>function searchWiki($dokuwiki, $search, $ns) { $query = "[ $search @$ns ]"; return $dokuwiki-&gt;search($query); } </code></pre> <p>However, it never seems to yield any search results, not matter what the search query is. E.g., </p> <pre><code>Query: [ user @detailed-manuals ] Result: object(xmlrpcval)#5 (3) { ["me"]=&gt; array(1) { ["array"]=&gt; array(0) { } } ["mytype"]=&gt; int(2) ["_php_class"]=&gt; NULL } </code></pre> <p>Even searching in the global namespace yields nothing, though it should as the term "user" shows up any number of times. If anyone could offer insight, that would be most helpful.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload