Not Able to setup API documentation site

Created on 28 July 2022, over 2 years ago
Updated 6 September 2023, about 1 year ago

Hi,
i've installed Api module to set up my own API documentation site,
and added projects and branches but a'm not getting any code documentation on my site and i've also did re-parse, clear cache and cron run still its not working

its giving me this error
Error: Call to undefined method Symfony\Component\Finder\Finder::hasResults() in Drupal\api\Parser->parseBranches() (line 279 of /opt/httpd/htdocs/staging/vlcore/master/web/modules/contrib/api/src/Parser.php)

The file permissions could not be set on /opt/httpd/htdocs/staging/example/master/web/sites/example.co.in/files/api_git_repositories. [error]

🐛 Bug report
Status

Closed: cannot reproduce

Version

2.0

Component

Parser

Created by

🇮🇳India Ali Rizvi

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇳India Ali Rizvi

    after runnig drush queue:run api_parse_queue
    i get this error :-
    The file permissions could not be set on /opt/httpd/htdocs/sites/vlcore/master/web/sites/default/files/api_git_repositories.[error]

    And if i open any of my project i get this message at the bottom
    A main page for this branch has not been indexed. A documentation comment with @mainpage needs to exist, or has not been indexed yet. For older versions of Drupal core, this is available in the documentation project in the developer subdirectory.

    how should i index main page for this branch?

  • 🇪🇸Spain fjgarlin

    The default folder is under the default "files" directory and it's called "api_git_repositories". You need to make sure that the "files" directory is writable, so it seems to be permissions related.

    As per that message, you only see it if you are an admin. Normal users won't see it. If you're indexing Drupal code, the "@mainpage" tag is already within the code. If it's a not Drupal project, then you can add it or not to the origin repo, depending on whether you want a customized entry page to the branch or not.

    I'd say fix the folder permissions first and make sure that everything is indexed, then see what happens.

    It seems that everything keeps on working as expected.

  • Status changed to Closed: works as designed over 1 year ago
  • Status changed to Active about 1 year ago
  • 🇮🇳India Ali Rizvi

    I have issues with parse queues of api

    cd /opt/httpd/htdocs/staging/mysite/master/web/sites/website.stage.co.in

    $ drush queue:list
     -------------------- ------- ---------------------------------
      Queue                Items   Class                            
     -------------------- ------- ---------------------------------
      api_delete_related   0       Drupal\Core\Queue\DatabaseQueue  
      api_parse_queue      52503   Drupal\Core\Queue\DatabaseQueue  
     -------------------- ------- ---------------------------------
    
    $ drush queue:delete api_parse_queue
     [success] All items in api_parse_queue queue deleted.
    
    $ drush queue:list
     -------------------- ------- ---------------------------------
      Queue                Items   Class                            
     -------------------- ------- ---------------------------------
      api_delete_related   0       Drupal\Core\Queue\DatabaseQueue  
      api_parse_queue      0       Drupal\Core\Queue\DatabaseQueue  
     -------------------- ------- ---------------------------------
    

    after every 10 to 15 day my site gets error :- your website encountered an unexpected error
    and when i delete all of the queue it works fine how should i fix this?

  • Status changed to Closed: cannot reproduce about 1 year ago
  • 🇪🇸Spain fjgarlin

    This really feels like a configuration issue on the webserver. In any case, it's impossible to debug or offer more help with that information.
    - Which exact error do you get? You might need to turn on error debugging to see the exact error.
    - Did you check the watchdog table?
    - Are you on the latest version of the api module?

    I suggest that if you want more help with the server set up, error debugging, etc that you use the community slack where I and many other community members could help you better than through this issue queue. See https://www.drupal.org/slack for information on how to join.

Production build 0.71.5 2024