maxcellent/javadoc.io

Javadoc search doesn't work

Closed this issue · 6 comments

Hi,

I discovered javadoc.io a few months ago and was super happy to use it for AssertJ Core.
AssertJ Core is targeted for java 8 but built with java 11, the javadoc built search capability is broken when navigating to the result: searching in the search textbox correctly shows the list of candidates corresponding to the text searched but when one selects a candidate the page displays an error like:

<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>5641D62303D47982</RequestId><HostId>Qy3TFOaRnVsj1V+RaZm9NruF12OGY7XVCZH8AxVY3z0QEVRWgMfpy6JD3WGJAOFVUcBsPxp+W8k=</HostId></Error>

Here's an example of link https://static.javadoc.io/org.assertj/assertj-core/3.13.2/undefined/org/assertj/core/api/StringAssert.html

The issue seems to come from the undefined subpath, maybe something due to java 9 module system ?

Adding <additionalJOption>--no-module-directories</additionalJOption> solved the issue. see assertj/assertj@9af0910

Unfortunately there is still an issue with search as one can see in https://www.javadoc.io/doc/org.assertj/assertj-core/3.14.0/index.html where the filtering work in the textbox but navigating to one of the matching items does not.

Note that search work fine for locally generated javadoc.

This is related to assertj/assertj#1657

It looks like there is a bug in the generated search.js. If we change line 322
from parent.classFrame.location = pathtoroot + url; to parent.location.href = pathtoroot + url; then it works.

This works when it's NOT running inside an iframe. As a workaround, you can use https://www.javadoc.io/static/org.assertj/assertj-core/3.14.0/index.html , trading off the top navbar.

Excellent thanks @maxcellent!