[opencms-dev] Multiple folders with the same exportname values are conflicting on static export

Noel Gelineau ngelineau at greenridge.ca
Wed Apr 12 08:47:41 CEST 2006


Here is another dilemma regarding sites, I'm using OpenCMS 6.0.x.  I have /sites/site1/ which has an exportname property value of "/".  I also have /sites/site2/ exportname property value set to "/".  Everything works fine in offline and publishing.  However, when doing a static export, I will sometimes get an index out of range error in the logs and only one of the sites will get exported.  I believe the exportname values "/" are conflicting.  I've tried both <staticexporthandler>'s: "org.opencms.staticexport.CmsAfterPublishStaticExportHandler" and "org.opencms.staticexport.CmsOnDemandStaticExportHandler".  My opencms-importexport.xml file explicitely defines different folders for each site:
	<staticexport enabled="true">
		<staticexporthandler>org.opencms.staticexport.CmsAfterPublishStaticExportHandler</staticexporthandler>
<!--		<staticexporthandler>org.opencms.staticexport.CmsOnDemandStaticExportHandler</staticexporthandler>-->
		<exportpath>//web/apache</exportpath>
		<defaultpropertyvalue>true</defaultpropertyvalue>
		<defaultsuffixes>
			<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"/>
			<suffix key=".js"/>
			<suffix key=".html"/>
		</defaultsuffixes>
		<rendersettings>
			<rfs-prefix></rfs-prefix>
			<vfs-prefix>${SERVLET_NAME}</vfs-prefix>
			<userelativelinks>false</userelativelinks>			
			<exporturl>http://127.0.0.1:8080/handle404</exporturl>
			<plainoptimization>true</plainoptimization>
			<testresource uri="/system/shared/page.dtd"/>
			<resourcestorender>
				<regex>/sites/site1/.*</regex>
				<regex>/sites/site2/.*</regex>
			</resourcestorender>
			<rfs-rules>
				<rfs-rule>
					<name>site1</name>
					<description>site1</description>
					<source>/sites/site1/.*</source>
					<rfs-prefix></rfs-prefix>
					<exportpath>//web/apache/sites/site1</exportpath>
					<userelativelinks>false</userelativelinks>
					<related-system-res>
						<regex></regex>
					</related-system-res>
				</rfs-rule>
				<rfs-rule>
					<name>site2</name>
					<description>site2</description>
					<source>/sites/site2/.*</source>
					<rfs-prefix></rfs-prefix>
					<exportpath>//web/apache/sites/site2</exportpath>
					<userelativelinks>false</userelativelinks>
					<related-system-res>
						<regex></regex>
					</related-system-res>
				</rfs-rule>
			</rfs-rules>
		</rendersettings>

One ugly way around the problem is to set exportname on /sites/site2/ to /junk/.  Hence, all published urls within that site will have /junk/ added to it, ie: www.site2.com/junk/test.html.

Thanks,
Noel Gelineau

-------------------------------------------------------------------------------------------------------------------
This communication, including its attachments, if any, is intended solely
for the recipient; it is confidential and may contain personal or private
information, or proprietary and/or privileged material. As such, any
unauthorized use, retention, copying, disclosure or other distribution of
this communication, or the taking of any action in reliance on its contents
is strictly prohibited. If you have received this communication in error,
please notify us immediately and delete this communication (and any
attachments.)




More information about the opencms-dev mailing list