[opencms-dev] static export 404 on Template Resources

Gerd Schrick mail at schrick-design.de
Mon Jun 11 03:59:46 CEST 2018


Kai,

that's also how I understand the setting(s description).
What I've tested: when it's set to 0 the "export" folder is used/filled.

Gerd

Am 8. Juni 2018 13:41:06 MESZ schrieb "Schliemann, Kai" <K.Schliemann at comundus.com>:
>Hi Fabian,
>thank you very much.
>Hmm, I know, that export backups can be configured with this tag
>        <exportbackups>2</exportbackups>
>
>AFAIK this means in that case, that the last 2 static exports are
>backuped. The first in folder „backup“ the second in folder „backup2“.
>This does, of course, not explain why there are no files in the folder
>„export“.
>
>Hope you are doing well.
>Best regards
>Kai
>
>Von: opencms-dev-bounces at opencms.org <opencms-dev-bounces at opencms.org>
>Im Auftrag von fhsubscriptions at componio.net
>Gesendet: Freitag, 8. Juni 2018 11:12
>An: 'The OpenCms mailing list' <opencms-dev at opencms.org>
>Betreff: Re: [opencms-dev] static export 404 on Template Resources
>
>Hi Kai,
>
>well put and great support, but the issue with the folders being
>backupXYZ rather then export did also occur with us.
>However I have forgotten how we fixed it 😊
>
>
>Cheers,
>
>\Fabian
>
>Von:
>opencms-dev-bounces at opencms.org<mailto:opencms-dev-bounces at opencms.org>
><opencms-dev-bounces at opencms.org<mailto:opencms-dev-bounces at opencms.org>>
>Im Auftrag von Schliemann, Kai
>Gesendet: Freitag, 8. Juni 2018 10:42
>An: The OpenCms mailing list
><opencms-dev at opencms.org<mailto:opencms-dev at opencms.org>>
>Betreff: Re: [opencms-dev] static export 404 on Template Resources
>
>Hi Gerd,
>ok here are some hints. Maybe they help.
>
>1.  Your setting in opencms-importexport.xml tells OpenCms to only
>export files with the file extensions mentioned in „defaultsuffixes“.
>If you want all resources (html, css, js, images…) to be exported, you
>have to either set „defaultpropertyvalue“ to „true“ (in
>opencms-importexport.xml) or set the property „export“ on e.g. the root
>folder of your site (e.g. on „sites/default/“)
>2.  In order to make static export work properly, you have to add the
>cms:link-Tag to resources in your templates. Not just the elements
>(like a logo) which style your website, but all resources which reside
>in OpenCms. E.g. using a link element in one of your XSDs. No matter,
>if you link to pages, images or download files. One exception. If you
>use the cms:img tag, you must not use the cms:link tag with it. So
>never mix cms:img and cms:link tag.
>  3.  Check port of Tomcat (that‘s what I already told you)
>4.  You may also check this thread:
>https://github.com/alkacon/opencms-core/issues/494
>
>Hope one of these hints help you. Please let me know. I am curious.
>
>Best regards
>Kai
>
>
>
>Von:
>opencms-dev-bounces at opencms.org<mailto:opencms-dev-bounces at opencms.org>
><opencms-dev-bounces at opencms.org<mailto:opencms-dev-bounces at opencms.org>>
>Im Auftrag von Gerd Schrick
>Gesendet: Donnerstag, 7. Juni 2018 20:13
>An: The OpenCms mailing list
><opencms-dev at opencms.org<mailto:opencms-dev at opencms.org>>
>Betreff: Re: [opencms-dev] static export 404 on Template Resources
>
>
>Dear OpenCms Gurus,
>
>pleeeeease help!!! ;-)
>I guess I'm dearly overlooking some details.
>I've created a relative simple site and now I want to do a full static
>export, so it can be hosted (w/o OpenCms).
>
>To do this I use Database Management / Start Static Export.
>Seems basically to work BUT:
>1. (the main problem): all the "Non-Template Resources" are exported,
>but for all of the "Template Resources" it just says "... 404"
>example:
>( 9 / 706 ) Exporting /sites/mysite/material/press/ ... 404
>( 10 / 706 ) Exporting /sites/mysite/material/press/index.html ... 404
>in Tomcat's localhost_access_log I see (for the above):
>127.0.0.1 - - [07/Jun/2018:17:24:06 +0200] "GET
>/opencms/handle404/opencms/export/sites/mysite/material/press/index.html
>HTTP/1.1" 404 -
>127.0.0.1 - - [07/Jun/2018:17:24:06 +0200] "GET
>/opencms/handle404/opencms/export/sites/mysite/material/press/
>HTTP/1.1" 404 -
>the "regular" urls are
>localhost:8080/material/press/
>localhost:8080/material/press/index.html
>but I assume that the difference here is somehow related to the static
>export logic.
>2. the exported files are first created in webapps/opencms/temp and
>when finished moved to folder "backup2" (! instead of "export", where I
>suspect them to go)
>
>And it doesn't seem to make any difference what is selected in
>Site/Project.
>
>My setup is OpenCms 10.5.3 on Tomcat 8 (standalone), both with the
>deafult settings from the installation.
>The excerpt of the opencms-importexport.xml is below.
>
>Would be really great if someone can point me in the right direction.
>
>Best regards,
>Gerd
>
>
>opencms-importexport.xml:
>    <staticexport enabled="true">
><staticexporthandler>org.opencms.staticexport.CmsOnDemandStaticExportHandler</staticexporthandler>
><linksubstitutionhandler>org.opencms.staticexport.CmsDefaultLinkSubstitutionHandler</linksubstitutionhandler>
>        <exportpath>export</exportpath>
>        <exportworkpath>temp</exportworkpath>
>        <exportbackups>2</exportbackups>
>        <defaultpropertyvalue>false</defaultpropertyvalue>
>        <defaultsuffixes>
>            <suffix key=".jpg" />
>            <suffix key=".gif" />
>            <suffix key=".png" />
>            <suffix key=".doc" />
>            <suffix key=".xls" />
>            <suffix key=".ppt" />
>            <suffix key=".docx" />
>            <suffix key=".xlsx" />
>            <suffix key=".pptx" />
>            <suffix key=".pdf" />
>            <suffix key=".txt" />
>            <suffix key=".css" />
>            <suffix key=".js" />
>            <suffix key=".zip" />
>            <suffix key=".swf" />
>        </defaultsuffixes>
>        <rendersettings>
>            <rfs-prefix>${CONTEXT_NAME}/export</rfs-prefix>
>            <vfs-prefix>${CONTEXT_NAME}</vfs-prefix>
>            <userelativelinks>true</userelativelinks>
><exporturl>http://127.0.0.1:8080${CONTEXT_NAME}/handle404</exporturl<http://127.0.0.1:8080$%7bCONTEXT_NAME%7d/handle404%3c/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>
>
>Gerd Schrick <mail at schrick-design.de<mailto:mail at schrick-design.de>>
>hat am 15. Mai 2018 um 19:14 geschrieben:
>
>Hi Kai,
>
>the port already was set correctly.
>
>As only resources/requests to
>/sites/default/... result in a 404
>but the ones to
>/system/... work
>it looks like there's somewhere kind of a (not working) url rewrite.
>As mentioned I didn't any Tomcat (standalone) nor OCMS config changes
>that may do that.
>
>I've still no idea what's going wrong here or where/what to look for.
>
>Maybe noone out there doing a full static export out-of-the-box?
>
>Best regards,
>Gerd
>Am 15. Mai 2018 08:42:33 MESZ schrieb "Schliemann, Kai"
><K.Schliemann at comundus.com<mailto:K.Schliemann at comundus.com>>:
>
>Hi Gerd,
>
>a common mistake is to not set the correct Tomcat port in
>opencms-importexport.xml. So if your Tomcat rums on port 8080, please
>make sure to set that port in opencms-importexport.xml.
>
>Best regards
>
>Kai
>
>
>
>Von:
>opencms-dev-bounces at opencms.org<mailto:opencms-dev-bounces at opencms.org>
><opencms-dev-bounces at opencms.org<mailto:opencms-dev-bounces at opencms.org>>
>Im Auftrag von Gerd Schrick
>Gesendet: Dienstag, 15. Mai 2018 03:27
>An: The OpenCms mailing list
><opencms-dev at opencms.org<mailto:opencms-dev at opencms.org>>
>Betreff: Re: [opencms-dev] static export 404 on Template Resources
>
>
>
>Anyone out there to help with this?
>
>Am 6. Mai 2018 01:25:43 MESZ schrieb Gerd Schrick
><mail at schrick-design.de<mailto:mail at schrick-design.de>>:
>
>Dear List,
>
>I'm on a fresh local install of 10.5.3 in Tomcat (8.5.11) including the
>example site (Apollo Demo).
>All configs/settings are unchanged.
>
>When I do a Static Export (Database Management -> Static export)
>there's no Error/Exception shown in the output but any resource below
>/sites shows ... 404 instead of ... o.k. and (as expected) none of them
>are exported.
>
>Excerpt from the output:
>::
>( 441 / 441 ) Exporting /system/workplace/commons/style/template.css
>... o.k.
>... exporting Non-Template Resources is finished.
>Exporting Template Resources ...
>::
>( 6 / 563 ) Exporting /system/workplace/commons/style/diff.css ... o.k.
>( 7 / 563 ) Exporting
>/sites/default/tutorial/step-6-publish-your-changes/index.html ... 404
>( 8 / 563 ) Exporting
>/sites/default/tutorial/step-6-publish-your-changes/ ... 404
>::
>
>It somehow makes sense to me as I get a 404 in the browser when I
>request the reported URLs
>example: /sites/default/tutorial/step-6-publish-your-changes/index.html
>404 when:
>http://mymachine:8080/sites/default/tutorial/step-6-publish-your-changes/index.html
>404 when:
>http://mymachine:8080/opencms/sites/default/tutorial/step-6-publish-your-changes/index.html
>correct when:
>http://mymachine:8080/opencms/tutorial/step-6-publish-your-changes/index.html
>
>in opencms_importexport.xml is
><exporturl>http://mymachine:8080${CONTEXT_NAME}/handle404</exporturl<http://mymachine:8080$%7bCONTEXT_NAME%7d/handle404%3c/exporturl>>
>to omit "/handle404" (as suggested here:
>https://github.com/alkacon/opencms-core/issues/494) did not change
>anything.
>
>I already found similar/same issues reported for older versions but all
>w/o a working solution.
>
>Thanks for your helpful hints!
>Gerd
>
>
>_______________________________________________
>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/20180611/042eb3d7/attachment.htm>


More information about the opencms-dev mailing list