If I try to type into the autocomplete field for the API block on D6, I get http errors. It looks like api_autocomplete() wasn't upgraded for D6. The attached patch fixes the problem on my local site.
Directory index forbidden by rule: /var/www/vhosts/nederdev.nl/subdomains/api/httpdocs/api/, referer: http://api.nederdev.nl/
This is what I get when clicking one of the branch tabs, except for the default one. /var/www/vhosts/nederdev.nl/subdomains/api/httpdocs/ is my Drupal root, alle indexes files are located in /var/www/vhosts/nederdev.nl/subdomains/api/httpdocs/api/[BRANCH]/ with [BRANCH] being one of the branches set up using the API settings page. Indexing files goes without trouble, it's just http://nederdev/api/[SHORT-NAME] that causes a WSOD and the aforementioned error to appear in my logs.
I'm not sure whether this is caused by something on my server or if it's API.module. To me it looks like the latter, because I don't see why the module would need a directory index. Next to that I can't see why directory indices would be forbidden, since API perfectly indexes all files.
The parser currently only shows a source view for pages which have any ectra text in the tag
e.g.
The attached patch allows for extra info in the body tag.
and falls back to including the whole page if the body tag is missing.
in file
// $Id: parser.inc,v 1.24.2.13 2007/11/16 19:56:52 drumm Exp $
the api_parse_html_file() function looks for a page title like this
if (preg_match('!(.*)!is', $source, $title_match)) {
$docblocks[0]['title'] = $title_match[1];
}
but the regex matches the empty string.
An empty title means you can't search for the file, and as search is the main navigation tool for api pages this is quite a big problem.
This regex will only match non-empty titles (leaving the title as the default - which is file_name)
if (preg_match('!(.+)!is', $source, $title_match)) {
if there are any large files in the directory being searched by API it can crash and leave cron in a stuck state
I have some text files ~300Mb that cause problems.
Cron getting stuck is pretty bad :-(
Possibile solutions
1) check file size before parsing (maybe performance problem)
2) provide settings to exclude some directories
I'll look into this some more but wanted to post the report before I forget about the problem (again)
The parser isn't recignizes function names beginning with ampersand, for example, take a look at
http://api.drupal.org/api/functions
You can see an empty row at the beginning. It's a &batch_get function. I've attached patch to solve this.
Handling @see are braking the summaries now. Take a look at search_box summary at this page:
http://api.drupal.org/api/file/modules/search/search.module/6
(there See alsosearch_box_form_submit() at the end)
To avoid this, we can add paragraph ending just before the See also header (and place paragpaph tag to the end to avoid breaking the code). After it all will be ok.
You can apply the patch in attachment.
I spent a while trying to find the D6 function batch_get()... turns out it lives in includes/form.inc but the & before the name to return a reference screws up the function name matching regex.
I got the cursed error message and found out how to get rid of it:
A main page for this branch has not been indexed. A documentation comment with @mainpage {title} needs to exist, or has not been indexed yet. For Drupal core, this is availiable in the developer documentation in the contributions repository.
I did a pretty simple index.php including a doxygen main page command and included it in one of the only 2 paths in the Directory name setting. As it was in the second path, it didn't work so I inverted them so it was the first one and it still didn't work, I then cut the second path as well as the separator and the error finally transformed into the main page; I then added the cut second path and the main page was still on and working well.