Forum OpenACS Development: Re: rp_handler and host-node mapped subsites

Collapse
Posted by Dave Bauer on
I still maintain the correct fix is to stop trying to mix URLs outside of a host-mapped subsite with those in the subsite.

To fix this you need to update packages such as notifications, search, and any other to handle all the facilities using the EMBEDs feature. This is very easy to do, but of course, I am not going to explain it here :) Ok I'll give the short short version. You just edit the APM dependency settings to embed the existing package. Any web accesible files you want to embed go into package-key/embed/ directory and they are avaiable under /my-package/search (for example). That should be it. It finally solves the issue of keeping context for these site-wide services.

Then what you want to do is embed these into your subsite package.

If your subsite has unique behavior you should create a new subsite that inherits from the acs-subsite package and put your custom code in the new subsite package.

Seriously. If you can upgrade to OpenACS 5.7 your life will be much easier.

Collapse
Posted by Ryan Gallimore on
Dave, how does embedding help when ad_conn url will still return incorrectly? Eduardo's links identify the hack that detects the subsite "root" of the URL and handles GETs but not POSTs.

What if the page I am posting to is a lib file inside acs-subsite? I can't very well embed acs-subsite inside (as in my case) a package that extends it.

I don't see getting the proper URL as unique behaviour.
Calling ad_conn url while in http://mapped_host/
should return "/" not /subsite/