marklogic-community / data-explorer

Data Explorer Tool
Other
15 stars 4 forks source link

Not seeing detail with trying to access document detail #182

Open xbonnamy-marklogic opened 5 years ago

xbonnamy-marklogic commented 5 years ago

I have a user with proper role & privilege to see conten. I added data-explorer(search & wizard)-role. After creation query & view, my user can search data but can not view detail. When clicking on URI to see document detail, nothing displays. Looking at network details in my browser, the following error is reported (see below). Is it natural?

Technical environment

MarkLogic 9.0-6.2

Error message

<!DOCTYPE html>

Data-Explorer - Error

Error

There has been an error.

<error:error xsi:schemaLocation="http://marklogic.com/xdmp/error error.xsd" xmlns:error="http://marklogic.com/xdmp/error" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <error:code>XDMP-ARGTYPE</error:code> <error:name>err:XPTY0004</error:name> <error:xquery-version>1.0-ml</error:xquery-version> <error:message>Invalid argument type</error:message> <error:format-string>XDMP-ARGTYPE: (err:XPTY0004) map:keys(()) -- arg1 is not of type map:map</error:format-string> <error:retryable>false</error:retryable> <error:expr>map:keys(())</error:expr> <error:data> <error:datum>arg1</error:datum> <error:datum>map:map</error:datum> </error:data> <error:stack> <error:frame> <error:uri>/server/endpoints/api-detail.xqy</error:uri> <error:line>104</error:line> <error:column>20</error:column> <error:operation>local:get-json("/dataModule/007f8829-dc77-4bd2-b833-ff343022bdf0", "technical-documentation-content")</error:operation> <error:variables> <error:variable> <error:name xmlns="">uri</error:name> <error:value>"/dataModule/007f8829-dc77-4bd2-b833-ff343022bdf0"</error:value> </error:variable> <error:variable> <error:name xmlns="">db</error:name> <error:value>"technical-documentation-content"</error:value> </error:variable> <error:variable> <error:name xmlns="">content-type</error:name> <error:value>"application/x-unknown-content-type"</error:value> </error:variable> <error:variable> <error:name xmlns="">doc</error:name> <error:value>fn:doc("/dataModule/007f8829-dc77-4bd2-b833-ff343022bdf0")</error:value> </error:variable> <error:variable> <error:name xmlns="">rawDoc</error:name> <error:value>"&lt;div class=&amp;quot;element&amp;quot;&gt;&lt;div class=&amp;quot;element&amp;quot;&gt;&lt;d..."</error:value> </error:variable> <error:variable> <error:name xmlns="">docText</error:name> <error:value>"&lt;div class=\&amp;quot;element\&amp;quot;&gt;&lt;div class=\&amp;quot;element\&amp;quot..."</error:value> </error:variable> <error:variable> <error:name xmlns="">docData</error:name> <error:value>"&lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;UTF-8\&amp;quot;?&gt; &lt;..."</error:value> </error:variable> <error:variable> <error:name xmlns="">docData</error:name> <error:value>"&amp;quot;&lt;?xml version=\&amp;quot;1.0\&amp;quot; encoding=\&amp;quot;UTF-8\&amp;quo..."</error:value> </error:variable> <error:variable> <error:name xmlns="">doctype</error:name> <error:value>""</error:value> </error:variable> <error:variable> <error:name xmlns="">collections</error:name> <error:value>("/program/A320", "/type/documentation")</error:value> </error:variable> <error:variable> <error:name xmlns="">permissions</error:name> <error:value>(&lt;permission&gt;&lt;capability&gt;update&lt;/capability&gt;&lt;role-name&gt;&lt;sec:role-name .../&gt;&lt;/role-name&gt;&lt;/permission&gt;, &lt;permission&gt;&lt;capability&gt;read&lt;/capability&gt;&lt;role-name&gt;&lt;sec:role-name .../&gt;&lt;/role-name&gt;&lt;/permission&gt;)</error:value> </error:variable> <error:variable> <error:name xmlns="">triples</error:name> <error:value>()</error:value> </error:variable> <error:variable> <error:name xmlns="">related-map</error:name> <error:value>()</error:value> </error:variable> </error:variables> <error:xquery-version>1.0-ml</error:xquery-version> </error:frame> <error:frame> <error:uri>/server/endpoints/api-detail.xqy</error:uri> <error:line>138</error:line> <error:column>46</error:column> <error:operation>local:get-details()</error:operation> <error:xquery-version>1.0-ml</error:xquery-version> </error:frame> <error:frame> <error:uri>/server/endpoints/api-detail.xqy</error:uri> <error:line>147</error:line> <error:column>11</error:column> <error:xquery-version>1.0-ml</error:xquery-version> </error:frame> </error:stack> </error:error>

markschiffner commented 5 years ago

Xavier, have you looked at the uri /dataModule/007f8829-dc77-4bd2-b833-ff343022bdf0 in the error message, is that the correct document? Does the document exist? It also does not have a type extension (xml,json), this could be the issue. Of course the data explorer should be better at catching that if it is the problem. Could you check these a see. I will see if there is someone available to look deeper.

xbonnamy-marklogic commented 5 years ago

It is the correct document/uri and it is of type XML but it's URI does not have the type extension. If I add a type extension, it works.

markschiffner commented 5 years ago

ok, thanks. We will keep this open as a bug to get fixed and/or at handle the exception.