[opencms-dev] Disable Static Export Issue
Edwin Chiu
edwin.chiu at gmail.com
Fri Nov 15 03:45:27 CET 2013
Code posted to github issue log.
Here is the reference:
https://github.com/alkacon/opencms-core/issues/197
On Thu, Nov 14, 2013 at 11:55 PM, Christian Steinert <
christian at christian-steinert.de> wrote:
> Dear Edwin
>
> If you have a fix that corrects the behavior then you can also submit it
> as a patch to opencms on github.
>
> All the best
> Christian
>
> Hi Christian,
>
> Thanks for your advice. I will give it a try with on demand handler.
>
> However, I want to disable the export feature ultimately as the OpenCms
> will be used in a cluster environment (multiple app server point to the
> same DB). Do not want resources export to /export/.
>
> I did the same way before. If you're interested in this topic, you can
> refer to
>
> http://opencms.996256.n3.nabble.com/Can-different-installations-of-OpenCms-connect-to-the-same-db-schema-td22113.html#a22123
>
> As a result, I modify the CmsStaticExportManger from 9.0 source codes.
>
> I will post the changes here tomorrow.
>
> Thanks
> Edwin
>
>
> On Thu, Nov 14, 2013 at 9:13 PM, Christian Steinert <
> christian at christian-steinert.de> wrote:
>
>> Dear Edwin
>>
>> I also observed that it creates problems in the workplace if static
>> export is completely disabled because some workplace resources (mostly CSS
>> files, it seems) will not be accessed correctly anymore even if they exist
>> in the correct location.
>>
>> The best you can do is to set it to the "on demand" handler which, I
>> think, is also the default setting. This will not cause any publish
>> activity by the system except when a page is requested that has not yet
>> been exported. So in a way, if you set the setting to "on demand" then it
>> will not do any harm and opencms will then construct the correct URLs to
>> also access the statically exported workplace resources.
>>
>> All the best
>> Christian
>>
>> > Hi All,
>> >
>> > In OpenCms 7.5, it is easy to disable the static export with setting
>> > <staticexport enabled="false"> in opencms-importexport.xml. It is no
>> problem
>> > with both demo and workplace.
>> >
>> > However, in 9.0, I try to disable it in the same way, the css or other
>> > static resources path still pointing to /export/.
>> >
>> > Even I have tried to modify some configuration inside <staticexport>
>> tag,
>> > but still fail.
>> >
>> > Another observation is that I download the 9.0 source code, looking to
>> the
>> > manifest.xml in some core modules and found that many workplace css or
>> image
>> > resources had a "export" properties with value "true". I think this
>> setting
>> > maybe one of possibilities that causing unexpected behavior in
>> disabling the
>> > static export.
>> >
>> > So, can anyone can show me that how I can disable the static export
>> > properly. Below is my configuration so far.
>> >
>> > <staticexport <b>enabled="false"*>
>> >
>> >
>> <staticexporthandler>org.opencms.staticexport.CmsOnDemandStaticExportHandler</staticexporthandler>
>> >
>> >
>> <linksubstitutionhandler>org.opencms.staticexport.CmsDefaultLinkSubstitutionHandler</linksubstitutionhandler>
>> > <exportpath></exportpath>
>> > <exportworkpath>temp</exportworkpath>
>> > <exportbackups>2</exportbackups>
>> > <defaultpropertyvalue>false</defaultpropertyvalue>
>> > <defaultsuffixes>
>> > <suffix key=".zip" />
>> > <suffix key=".jpg" />
>> > <suffix key=".gif" />
>> > <suffix key=".png" />
>> > <suffix key=".doc" />
>> > <suffix key=".xls" />
>> > <suffix key=".ppt" />
>> > <suffix key=".pdf" />
>> > <suffix key=".txt" />
>> > <suffix key=".css" />
>> > <suffix key=".zip" />
>> > <suffix key=".swf" />
>> > </defaultsuffixes>
>> > <rendersettings>
>> >
>> *<rfs-prefix>${CONTEXT_NAME}${SERVLET_NAME}</rfs-prefix>*
>> >
>> <vfs-prefix>${CONTEXT_NAME}${SERVLET_NAME}</vfs-prefix>
>> > <userelativelinks>false</userelativelinks>
>> > <exporturl>http://127.0.0.1:8080
>> ${CONTEXT_NAME}/handle404</exporturl>
>> > <plainoptimization>true</plainoptimization>
>> > <testresource uri="/system/shared/page.dtd" />
>> > <resourcestorender>
>> > <regex>/sites/.*</regex>
>> >
>> <regex>/system/workplace/commons/style/.*</regex>
>> > <regex>/system/galleries/.*</regex>
>> >
>> <regex>/system/modules/.*/resources/.*</regex>
>> > </resourcestorender>
>> > </rendersettings>
>> > </staticexport>
>> >
>> > Thanks
>> > Edwin
>> >
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> http://opencms.996256.n3.nabble.com/Disable-Static-Export-Issue-tp23769.html
>> > Sent from the OpenCMS mailing list archive at Nabble.com.
>> > _______________________________________________
>> > 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/cgi-bin/mailman/listinfo/opencms-dev
>> >
>> >
>> >
>> >
>>
>> _______________________________________________
>> 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/cgi-bin/mailman/listinfo/opencms-dev
>>
>>
>>
>>
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visithttp://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
>
>
>
> _______________________________________________
> 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/cgi-bin/mailman/listinfo/opencms-dev
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20131115/7ebf1640/attachment.htm>
More information about the opencms-dev
mailing list