| 
      
      
      From: Chris W. <ch...@cw...> - 2001-12-13 04:22:20
      
     | 
| * Chris Winters (ch...@cw...) [011210 20:42]: > * John Sequeira (js...@me...) [011210 17:29]: > > I'm having some trouble serving static pages. I've got a package > > with some web pages in the /html folder. GIF's in a package > > subfolder /html/images are served up correctly from my templates, > > but I can't directly access these pages from a url. In other words, > > http://myserver.com/mylogo.gif works but > > http://myserver.com/newpagename.htm get a file not found error. The > > OpenInteract default page serves up correctly, so base_page is > > working... but not on html within my package. > > Doh! I forgot to add this in to the apply/upgrade_package process. The > problem is that there are no 'page' objects corresponding to the files > in the filesystem. I'll try and fix this for the next verrsion. Well, I took a look at this and we have some problems. Basically, there is no OpenInteract environment created when this process (apply/upgrade_package, or OpenInteract::Package->install_to_website) is running. The main reason is that we could be calling this when the website is first being created, or before the user has configured the site, or before the user has created the SQL tables necessary to hold what we need. So... the answer for now (and maybe forever) is to create a data/mypages.dat file that includes the information OI needs to create objects during the 'install_sql' action. This is pretty easy -- take a look at: pkg/base_page-x.xx/data/page.dat pkg/system_doc-x.xx/data/page.dat You'd then just specify it in your SQLInstall class, like: $BASE_INSTALL/pkg/base_page-x.xx/OpenInteract/SQLInstall/Page.pm $BASE_INSTALL/pkg/system_doc-x.xx/OpenInteract/SQLInstall/SystemDoc.pm Also with the next version I'll probably have (somewhere) a script or action you can call from oi_manage that will dump SQL data into the above format for you. And an alteration of this could make for portable/installable themes, which would be nifty. Later, Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |