Forum OpenACS Development: Diagram pkg

Collapse
Posted by Iuri Sampaio on
Hi there,

I tried to access references to template::digram::create pn API docs
but it not available.

Neither on /api-doc/ on my oacs box nor on openacs.org

Does anyone know how to enable API http://iurix.com/api-doc/proc-view?proc=template::diagram::create ?

Collapse
2: Re: Diagram pkg (response to 1)
Posted by Gustaf Neumann on
Install the diagram package on your local box. api-doc offers only the API of the installed packages.
Collapse
3: Re: Diagram pkg (response to 2)
Posted by Iuri Sampaio on
Hi Gustaff,

I did install it.
http://iurix.com/api-doc/proc-view?proc=template::diagram::create

Somehow /api-doc isn't enable on my installation. Meaning if I search for any api method it throws out errors. Plus If I click on the link to the mainpage of /api-doc it takes me to the /doc mainpage

Collapse
4: Re: Diagram pkg (response to 3)
Posted by Gustaf Neumann on
The best solution would be certainly to fix the api-browser in your installation. What version of OpenACS (acs-core) + acs-api-browser do you have?
Collapse
5: Re: Diagram pkg (response to 4)
Posted by Iuri Sampaio on
acs-api-browser 5.7.0; acs-kernel 5.7.0;

Apparently, core packages work fine but /api-doc. I haven't changed anything to core pkgs.

Collapse
6: Re: Diagram pkg (response to 5)
Posted by Iuri Sampaio on
Somehow I had api-doc mounted as Documentation pkg. I believe that's why the urls were broken.
api-doc Documentation Documentation add folder unmount rename delete permissions

In order to avoid debbuging the problem within the source code, I decided to go to /admin/site-map to unmount and delete the instance "api-doc". Then I went to /acs-admin/apm, disabled, uninstalled it then I installed acs-api-browser over again.

But now acs-api-browser appears on /acs-admin/apm but it doesn't on site-map as expected. It seems it hasn't been mounted at the moment of package installation. /api-doc/ now returns "Server Error"

Collapse
7: Re: Diagram pkg (response to 6)
Posted by Gustaf Neumann on

Dear Iuri,

when deleting the api-browser, you should have seen a message, that you should NOT do this. The acs-api-browser package belongs to core and is an "initial-install package". Its package description does not contain a mount url, since the installer cares for this. Therefore, the package manager (acs-admin/apm) has now idea where to mount the package and how it should be set up.

However, live with OpenACS is not without hope: paste the following commands to your ds/shell, and /api-doc will revive.

    set api_browser_id \
        [site_node::instantiate_and_mount -node_name api-doc \
             -package_key acs-api-browser]
    permission::grant -party_id [acs_magic_object registered_users] \
        -object_id $api_browser_id \
        -privilege read
    permission::set_not_inherit -object_id $api_browser_id

all the best
-g

Collapse
8: Re: Diagram pkg (response to 7)
Posted by Iuri Sampaio on
Thanks Gustaf. It works fine now.

Your notes made remind me that I can always go to the core install scripts and grab "carefully" the chunks from there to force executions.

Collapse
9: Re: Diagram pkg (response to 8)
Posted by Gustaf Neumann on
yes, the source is your friend.