404 when clicking on a function name in search results - extra dots in filename #188

bananastalktome opened this Issue Oct 15, 2012 · 1 comment


None yet
2 participants

Using the most recent release, 2.8.0, when performing a search for a function in the default template, the page it links to gives me a 404. This is because two extra dots are added to the resulting filename (ex/ function-update_metadata...html). I think this has to do with line ~84 of the default template main.js file (https://github.com/apigen/apigen/blob/develop/templates/default/js/main.js#L84), which replaces the parenthesis found in the function name with dots since they aren't word characters (AFAIK \w only includes [A-Za-z0-9_]).

Changing this line to var file = $.sprintf(ApiGen.config.templates.main[autocompleteFiles[data[0]]].filename, parts[0].replace(/[^\w]/g, '')); fixed the issue for me, but since I am not very familiar with the apigen codebase, I was not sure why this was originally added and what impact this change would have overall.

To replicate, try creating docs for WordPress 3.4.2 source, using php -d memory_limit=512M ./apigen/apigen.php -s /path/to/wordpress/ --php no --source-code no -d ./wpdocs --title "WordPress Docs"

kukulich was assigned Oct 15, 2012


kukulich commented Oct 15, 2012

It looks like I missed something during refactoring. Thanks, I will look at it.

kukulich closed this Nov 3, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment