I have finally traced down why I can't call portal::initialize under subsite::after_mount. Bug and patch here:
https://openacs.org/bugtracker/openacs/bug?bug%5fnumber=2034
While doing this, I also notice maybe it is better to have portal::page::get_id to create a new page in case it doesn't find one. Or atleast generate a good error? Failure of db_string get_page_id_select {} is a bit vague.
I also noticed it was bit hard to trace under subsite::after_mount. I am unsure where was the error coming from so it took some "error" and ns_log to find it.
Are you guys kind enough to tell it is still redirecting to portal/www/admin/configure when in fact I have configured it already and initialized? Thanks.