[opencms-dev] Switching to static export on demand.

Andy Savin A.D.Savin at bath.ac.uk
Tue May 13 16:55:13 CEST 2008


Hi Michael,

Thanks for that, I have that working and when you publish a resource it
correctly deletes that resource and apache sends you to the cms 404
handler as expected.

However, the problems I am having are with the following situations:

1) You make changes to a template.  None of the xmlpages that are using
that template are removed which means apache will always server the
version using the old template.

2) You rename or move a resource that is linked to (href) from another
resource.  I now know, thanks to your presentation, that the linking page
won't get updated until it is read but it is not deleted and so apache
never asks for it to be re-read.

3) You update a property on a folder, which is used by all resources in
the folder (via the template) to define menus etc.  The folder is
deleted but the resourses are not deleted and so never use the new
property.  I'm not sure if this one would be solved using the Html Subtree
handler.

4) You update a resource that is included in a template using a property
defined on a folder (see point 3).  This doesn't force the folder to be
reexported.

These were all possible using export rules when using after publish static
export.  Am I missing something or is on demand static export not as
suitable to our needs as it appeared?

Regards,

Andy



-- 
----------------------------
  WEB SYSTEMS DEVELOPER
  Web Services
  University of Bath
  Tel: 01225 38 6275
----------------------------

On Tue, 13 May 2008, Michael Moossen wrote:

> From: Michael Moossen <m.moossen at alkacon.com>
> To: The OpenCms mailing list <opencms-dev at opencms.org>
> Date: Tue, 13 May 2008 15:14:29 +0200
> Subject: Re: [opencms-dev] Switching to static export on demand.
> Reply-To: The OpenCms mailing list <opencms-dev at opencms.org>
> X-Spam-Score: 0.1 (/)
>
> Hi Andy!
>
>  > My question is this, when you publish changes to a template it doesn't
>  > seem to do anything with the exported resources.  Therefore apache
>  > continues to serve the old version.
> then something is wrong with you configuration...
>
> first, the rewrite rule should look like these:
> RewriteCond %{REQUEST_URI} ^/export/.*$
> RewriteCond "%{DOCUMENT_ROOT}%{REQUEST_FILENAME}" !-f
> RewriteCond "%{DOCUMENT_ROOT}%{REQUEST_FILENAME}/index_export.html" !-f
> RewriteRule .*
> ${webapp}/${servlet}/handle404?exporturi=%{REQUEST_URI}&%{QUERY_STRING} [P]
>
> where you have to set ${webapp} and ${servlet} to the right value, most
> likely there is no webapp if OpenCms is installed as ROOT, and
> ${servlet} is opencms.
>
> then it is important that the rfs-prefix and vfs-prefix values in your
> opencms-importexport.xml are right, most likely your problem lies here.
>
> the best to check this and to get a better idea how all this works just
> quickly debug the A_CmsStaticExportHandler#scrubResource method, there
> you will see where OpenCms tries to find the files, so you easily make
> the configuration values to work.
>
> HTH
>
> Kind regards,
> Michael
>
> -------------------
>
> Alkacon Software GmbH  - The OpenCms Experts
> http://www.alkacon.com - http://www.opencms.org
>
>
> Andy Savin wrote:
> > Hi all,
> >
> > We have been using Static Export After Publish until now but after
> > speaking to various people at the conference I thought I might try out
> > static export on demand.
> >
> > I have switched the export handler to on demand in
> > opencms-importexport.xml and included a rfs rule for everything under the
> > /sites folder.
> >
> > I have apache 2 looking at the export directory defined by that rule
> > (/www/vhosts/bath-dev/opencms/)
> >
> > My plan is to point apache's 404 error page at OpenCms handle404 so that
> > when a resource is removed from the export folder (i.e. when published)
> > and apache can't find it gets served from the cms.
> >
> > My question is this, when you publish changes to a template it doesn't
> > seem to do anything with the exported resources.  Therefore apache
> > continues to serve the old version.
> >
> > Am I missing something or is there a better way of doing this?
> >
> > I'm using version 7.0.4
> >
> > Regards
> >
> > Andy
> >
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>




More information about the opencms-dev mailing list