[opencms-dev] Bug? Re: 404 on export when exportname is "/"
Marc Johnen
opencms at johnen.biz
Wed Apr 15 13:03:15 CEST 2009
Thank you for your answer Dave.
I'm afraid this is not a feasible solution as I would
have to adjust the configuration every time the
user ads a folder.
Also I think there's something wrong with my configuration.
I tried the same in 6.2.3 and got the same error, or is
this maybe a bug?
Greetings
Marc
Dave Clark wrote:
>
> Marc,
>
> Using "/" as exportname for "/sites/default/" didn't work for me. Instead
> I used "/" as exportname for each of its subdirectories I wanted to
> export, and created an rfs-rules rule for each of those subdirectories.
> That worked for me in 7.0.5.
>
> -- Dave Clark
>
>
>
>>>> Marc Johnen <opencms at johnen.biz> 4/9/2009 10:07 AM >>>
>
> Hello everyone,
>
> I'd like to make a static export of two websites. The export won't contain
> any
> dynamic things and will be copied from my local computer to an apache
> directory
> on the server.
> Therefore the export should not contain any links with "/opencms/opencms",
> this is why
> I removed the "rfs-prefix". Now I wanted to remove the
> "/sites/mysite1.de/"
> from
> the links, so I set the exportname for the folde "/sites/mysite1.de/" to
> "/".
> When I export the site I get a 404 when the export of template-resources
> starts.
> Strangely it does work, when I set the exportname to anything other than
> "/", e.g.
> "/test", but then I have "test" in the links as well which is not what I
> want.
> Does anyone have a clue why this happens?
> Thanks and greetings
> Marc Johnen
>
> error message:
> 08 Apr 2009 16:38:19,152 INFO [fterPublishStaticExportHandler: 450]
> Request
> result for RFS file "/_contentlinkbox.conf" with url
> "http://127.0.0.1:8380/opencms/handle404/_contentlinkbox.conf" was
> STATUS=404
> 08 Apr 2009 16:38:19,195 DEBUG [fterPublishStaticExportHandler: 384]
> Sending
> request for RFS file "/_global.conf" with url
> "http://127.0.0.1:8380/opencms/handle404/_global.conf"
> 08 Apr 2009 16:38:19,196 DEBUG [fterPublishStaticExportHandler: 427]
> Request
> for RFS file "_global.conf" "If-Modified-Since" header set to "0"
> 08 Apr 2009 16:38:19,230 DEBUG [pencms.site.CmsSiteManagerImpl: 686]
> Matching request [http://127.0.0.1:8380] to site server: * uri:
> /sites/mysite1.de title: /sites/mysite1.de/
> 08 Apr 2009 16:38:19,272 INFO [fterPublishStaticExportHandler: 450]
> Request
> result for RFS file "/_global.conf" with url
> "http://127.0.0.1:8380/opencms/handle404/_global.conf" was STATUS=404
> 08 Apr 2009 16:38:23,717 DEBUG [pencms.site.CmsSiteManagerImpl: 686]
> Matching request [http://mysite1:8380] to site server: * uri:
> /sites/mysite1.de title: /sites/mysite1.de/
>
>
> opencms-system.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE opencms SYSTEM
> "http://www.opencms.org/dtd/6.0/opencms-system.dtd">
> <opencms>
> <system>
> <internationalization>
> <localehandler class="org.opencms.i18n.CmsDefaultLocaleHandler"/>
> <localesconfigured>
> <locale>en</locale>
> <locale>de</locale>
> </localesconfigured>
> <localesdefault>
> <locale>en</locale>
> <locale>de</locale>
> </localesdefault>
> </internationalization>
> <mail>
> <mailfrom>nobody at nowhere.com</mailfrom>
> <mailhost name="my.smtp.server" protocol="smtp" user="username"
> password="secure"/>
> <mailhost name="alternative.smtp.server"/>
> <mailhost name="another.alternative.smtp.server"/>
> </mail>
> <scheduler/>
> <versionhistory enabled="true" count="10" deleted="4"/>
> <resourceinit>
> <resourceinithandler
> class="org.opencms.file.history.CmsHistoryResourceHandler"/>
> <resourceinithandler
> class="org.opencms.main.CmsPermalinkResourceHandler"/>
> <resourceinithandler
> class="org.opencms.workplace.CmsWorkplaceLoginHandler"/>
> </resourceinit>
> <requesthandlers/>
> <passwordhandler
> class="org.opencms.security.CmsDefaultPasswordHandler">
> <encoding>UTF-8</encoding>
> <digest-type>MD5</digest-type>
> false
> </passwordhandler>
> <validationhandler
> class="org.opencms.security.CmsDefaultValidationHandler"/>
> <sites>
> <workplace-server>http://localhost:8380</workplace-server>
> <default-uri>/sites/mysite1.de/</default-uri>
> <site server="http://localhost:8381" uri="/sites/mysite1.de/"/>
> <site server="http://localhost:8382" uri="/sites/mysite2.de/"/>
> </sites>
> <runtimeproperties>
> false
> /opencms/opencms/
> </runtimeproperties>
> <runtimeclasses>
> <runtimeinfo class="org.opencms.db.CmsDbContextFactory"/>
> </runtimeclasses>
> <defaultusers>
> <user-admin>Admin</user-admin>
> <user-guest>Guest</user-guest>
> <user-export>Export</user-export>
> <group-administrators>Administrators</group-administrators>
> <group-projectmanagers>Projectmanagers</group-projectmanagers>
> <group-users>Users</group-users>
> <group-guests>Guests</group-guests>
> </defaultusers>
> <defaultcontentencoding>UTF-8</defaultcontentencoding>
> <memorymonitor class="org.opencms.monitor.CmsMemoryMonitor">
> <maxusagepercent>90</maxusagepercent>
> <log-interval>600</log-interval>
> <email-interval>43200</email-interval>
> <warning-interval>43200</warning-interval>
> </memorymonitor>
> <flexcache>
> <cache-enabled>true</cache-enabled>
> <cache-offline>false</cache-offline>
> <maxcachebytes>8000000</maxcachebytes>
> <avgcachebytes>6000000</avgcachebytes>
> <maxentrybytes>400000</maxentrybytes>
> <maxkeys>2000</maxkeys>
> </flexcache>
> <http-authentication>
> <browser-based>true</browser-based>
> </http-authentication>
> <resultcache>
> <keygenerator>org.opencms.db.CmsCacheKey</keygenerator>
> <size-users>64</size-users>
> <size-groups>64</size-groups>
> <size-orgunits>64</size-orgunits>
> <size-usergroups>256</size-usergroups>
> <size-projects>32</size-projects>
> <size-projectresources>64</size-projectresources>
> <size-resources>8192</size-resources>
> <size-resourcelists>256</size-resourcelists>
> <size-properties>1024</size-properties>
> <size-propertylists>1024</size-propertylists>
> <size-accesscontrollists>1024</size-accesscontrollists>
> <size-permissions>1024</size-permissions>
> </resultcache>
> <content-notification>
> <notification-time>365</notification-time>
> <notification-project>Offline</notification-project>
> </content-notification>
> <authorizationhandler
> class="org.opencms.security.CmsDefaultAuthorizationHandler"/>
> <publishmanager>
> <history-size>100</history-size>
> <queue-persistance>true</queue-persistance>
> <queue-shutdowntime>1</queue-shutdowntime>
> </publishmanager>
> <session-storageprovider
> class="org.opencms.main.CmsDefaultSessionStorageProvider"/>
> <permissionhandler
> class="org.opencms.security.CmsDefaultPermissionHandler"/>
> <servletcontainer-settings mode="manual">
> <prevent-response-flush>false</prevent-response-flush>
> <release-tags-after-end>true</release-tags-after-end>
> </servletcontainer-settings>
> </system>
> </opencms>
>
>
> opencms-importexport.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE opencms SYSTEM
> "http://www.opencms.org/dtd/6.0/opencms-importexport.dtd">
> <opencms>
> <importexport>
> <importexporthandlers>
> <importexporthandler
> class="org.opencms.importexport.CmsVfsImportExportHandler"/>
> <importexporthandler
> class="org.opencms.module.CmsModuleImportExportHandler"/>
> </importexporthandlers>
> <import>
> <overwrite>true</overwrite>
> <convert>true</convert>
> <importversions>
> <importversion class="org.opencms.importexport.CmsImportVersion2"/>
> <importversion class="org.opencms.importexport.CmsImportVersion3"/>
> <importversion class="org.opencms.importexport.CmsImportVersion4"/>
> <importversion class="org.opencms.importexport.CmsImportVersion5"/>
> <importversion class="org.opencms.importexport.CmsImportVersion6"/>
> <importversion class="org.opencms.importexport.CmsImportVersion7"/>
> </importversions>
> <immutables>
> <resource uri="/system/"/>
> <resource uri="/system/categories/"/>
> <resource uri="/system/galleries/"/>
> <resource uri="/system/galleries/download/"/>
> <resource uri="/system/galleries/externallinks/"/>
> <resource uri="/system/galleries/htmlgalleries/"/>
> <resource uri="/system/galleries/pics/"/>
> <resource uri="/system/login/"/>
> <resource uri="/system/modules/"/>
> <resource uri="/system/shared/"/>
> <resource uri="/system/workplace/"/>
> <resource uri="/system/workplace/admin/"/>
> <resource uri="/system/workplace/help/"/>
> <resource uri="/system/workplace/locales/"/>
> <resource uri="/system/workplace/resources/"/>
> <resource uri="/system/workplace/restypes/"/>
> <resource uri="/system/workplace/scripts/"/>
> <resource uri="/system/workplace/templates/"/>
> <resource uri="/system/workplace/views/"/>
> <resource uri="/sites/"/>
> </immutables>
> <principaltranslations/>
> <ignoredproperties/>
> </import>
> </importexport>
> <staticexport enabled="true">
>
> <!--<staticexporthandler>org.opencms.staticexport.CmsOnDemandStaticExportHandler</staticexporthandler>-->
>
> <!--<staticexporthandler>org.opencms.staticexport.CmsOnDemandHtmlSubtreeHandler</staticexporthandler>-->
>
> <staticexporthandler>org.opencms.staticexport.CmsAfterPublishStaticExportHandler</staticexporthandler>
> <exportpath>export</exportpath>
> <defaultpropertyvalue>true</defaultpropertyvalue>
> <!-- wird nur genommen, wenn defaultpropertyvalue=true -->
> <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"/>
> </defaultsuffixes>
> <rendersettings>
> <rfs-prefix></rfs-prefix>
>
> <vfs-prefix>${CONTEXT_NAME}${SERVLET_NAME}</vfs-prefix>
> <userelativelinks>false</userelativelinks>
>
> <exporturl>http://localhost:8380${CONTEXT_NAME}/handle404</exporturl>
> <plainoptimization>true</plainoptimization>
> <testresource uri="/system/shared/page.dtd"/>
> <resourcestorender>
> <regex>/sites/mysite1.de/.*</regex>
> <regex>/sites/mysite2.de.de/.*</regex>
>
> <regex>/system/modules/de.mysite1.frontend/resources.*</regex>
>
> <regex>/system/modules/de.mysite2.frontend/resources.*</regex>
> <export-rules>
> <export-rule>
> <name>mysite1.de</name>
> <description>export rules
> for mysite1.de</description>
> <modified-resources>
>
> <regex>/sites/mysite1\.de/.*</regex>
>
> <regex>/system/modules/de.mysite1.frontend/.*</regex>
> </modified-resources>
> <export-resources>
>
> <uri>/sites/mysite1.de/</uri>
> </export-resources>
> </export-rule>
> <export-rule>
> <name>sfp.de</name>
> <description>export rules
> for mysite2.de</description>
> <modified-resources>
>
> <regex>/sites/mysite2\.de/.*</regex>
>
> <regex>/system/modules/de.mysite2.frontend/.*</regex>
> </modified-resources>
> <export-resources>
>
> <uri>/sites/mysite2.de/</uri>
> </export-resources>
> </export-rule>
> </export-rules>
> </resourcestorender>
> <rfs-rules>
> <rfs-rule>
> <name>mysite1.de</name>
> <description>export rules for
> mysite1.de</description>
>
> <source>/sites/mysite1\.de/.*</source>
> <rfs-prefix></rfs-prefix>
>
> <exportpath>/srv/tomcat/opencms7/www/mysite1.de</exportpath>
>
> <userelativelinks>false</userelativelinks>
> <related-system-res>
>
> <regex>/system/modules/de.mysite1.frontend/resources/.*</regex>
> </related-system-res>
> </rfs-rule>
> <rfs-rule>
> <name>sfp.de</name>
> <description>export rules for
> mysite2.de</description>
>
> <source>/sites/mysite2\.de/.*</source>
> <rfs-prefix>/</rfs-prefix>
>
> <exportpath>/srv/tomcat/opencms7/www/mysite2.de.de</exportpath>
>
> <userelativelinks>true</userelativelinks>
> <related-system-res>
>
> <regex>/system/modules/de.mysite2.frontend/resources/.*</regex>
> </related-system-res>
> </rfs-rule>
> </rfs-rules>
> </rendersettings>
> </staticexport>
> <usercsvexport>
> <separator>;</separator>
> <columns>
> <column>description</column>
> <column>lastname</column>
> <column>firstname</column>
> <column>email</column>
> <column>address</column>
> <column>zipcode</column>
> <column>city</column>
> <column>country</column>
> <column>USERPREFERENCES_workplace-startupsettingssite</column>
> <column>USERPREFERENCES_workplace-startupsettingslocale</column>
> <column>password</column>
> </columns>
> </usercsvexport>
> <repositories>
> <repository name="standard" class="org.opencms.repository.CmsRepository">
> <params>
> org.opencms.file.wrapper.CmsResourceExtensionWrapperJsp
> org.opencms.file.wrapper.CmsResourceExtensionWrapperXmlContent
> org.opencms.file.wrapper.CmsResourceExtensionWrapperXmlPage
> org.opencms.file.wrapper.CmsResourceWrapperSystemFolder
> org.opencms.file.wrapper.CmsResourceWrapperPropertyFile
> </params>
> <filter type="include">
> <regex>/</regex>
> <regex>/__properties/.*</regex>
> <regex>/sites/.*</regex>
> <regex>/system/</regex>
> <regex>/system/__properties/.*</regex>
> <regex>/system/galleries/.*</regex>
> <regex>/system/modules/.*</regex>
> <regex>/system/workplace/.*</regex>
> </filter>
> </repository>
> <repository name="extended" class="org.opencms.repository.CmsRepository">
> <params>
> org.opencms.file.wrapper.CmsResourceExtensionWrapperJsp
> org.opencms.file.wrapper.CmsResourceExtensionWrapperXmlContent
> org.opencms.file.wrapper.CmsResourceWrapperXmlPage
> org.opencms.file.wrapper.CmsResourceWrapperSystemFolder
> org.opencms.file.wrapper.CmsResourceWrapperPropertyFile
> </params>
> <filter type="include">
> <regex>/</regex>
> <regex>/__properties/.*</regex>
> <regex>/sites/.*</regex>
> <regex>/system/</regex>
> <regex>/system/__properties/.*</regex>
> <regex>/system/galleries/.*</regex>
> <regex>/system/modules/</regex>
> <regex>/system/modules/[^/]*/</regex>
> <regex>/system/modules/[^/]*/__properties/.*</regex>
> <regex>/system/modules/[^/]*/resources/.*</regex>
> </filter>
> </repository>
> </repositories>
> </opencms>
> --
> View this message in context:
> http://www.nabble.com/404-on-export-when-exportname-is-%22-%22-tp22974081p22974081.html
> Sent from the OpenCMS - Dev 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/mailman/listinfo/opencms-dev
>
--
View this message in context: http://www.nabble.com/Used-rfs-rules-for-subdirectories-Re%3A-404%09-on-export-when-exportname-is-%22-%22-tp23027263p23056706.html
Sent from the OpenCMS - Dev mailing list archive at Nabble.com.
More information about the opencms-dev
mailing list