[opencms-dev] Static Export & "External Links" (Pointers)

Brabenetz, Harald harald.brabenetz at bearingpoint.com
Mon Jan 9 16:57:36 CET 2006


Hello together,

I´m working with OpenCms 6.0.2 and run into a problem with the Static
Export & "External Links" (Pointers).

Explanation:

I wanted to forward from /sites/default/index.html to
/sites/default/overview/index.html

So I created an "external Link" (/sites/default/index.html) with a
Link-URL="./overview/index.html".

But it didn´t work with the static export:
The LinkManager genarated a link like
/OpenCms/OpenCms/sites/default/overview/index.html
But the site is located in /OpenCms/OpenCms/overview/index.html

Properties of /sites/default/ :
export=true
exportname=/



Please confirm wheather this is the correct solution or not:

After some time I thought there might be a bug in
CmsStaticExportManager.export(...)
I added one line (Line 430) and the Export worked fine!

Code:

           ......
           ......
           ......
409        CmsContextInfo contextInfo = new CmsContextInfo(
410            cms.getRequestContext().currentUser(),
411            cms.getRequestContext().currentProject(),
412            vfsName,
413            "/",
414            i18nInfo.getLocale(),
415            i18nInfo.getEncoding(),
416            remoteAddr);
417
418        cms = OpenCms.initCmsObject(null, contextInfo);
419
420        if (siteRoot != null) {
421            vfsName = vfsName.substring(siteRoot.length());
422        } else {
423            siteRoot = "/";
424        }
425
426        if (LOG.isDebugEnabled()) {
427            LOG.debug(Messages.get().key(Messages.LOG_STATIC_EXPORT_SITE_ROOT_2, siteRoot, vfsName));
428        }
429        cms.getRequestContext().setSiteRoot(siteRoot);
430        cms.getRequestContext().setUri(vfsName); //New Line from brabenetz 2005-12-05
431
432        String oldUri = null;
433
434        // this flag signals if the export method is used for "on demand" or "after publish".
435        // if no request and result stream are available, it was called during "export on publish"
436        boolean exportOnDemand = ((req != null) && (res != null));
           ......
           ......
           ......



see also: http://www.opencms-forum.de/viewtopic.php?t=1289

Thanks for your reply anyway



There are maybe simlar problems in following mails:

Jeff White jeff.white at jvolution.co.uk
Mon Dec 19 11:54:42 CET 2005
http://lists.opencms.org/pipermail/opencms-dev/2005q4/021379.html

Pere Torrodellas ptorrodellas at fihoca.com
Fri Dec 16 17:53:26 CET 2005
http://lists.opencms.org/pipermail/opencms-dev/2005q4/021339.html

Borja Riesgo Juan briesgo at sgi.es
Thu Dec 15 19:42:38 CET 2005
http://lists.opencms.org/pipermail/opencms-dev/2005q4/021311.html



Cheers
Harald

Harald Brabenetz | Senior Consultant | BearingPoint | A-8141 Graz |
Seering 6 | Phone +43 - (0)316 - 8003 - 1250
<mailto:harald.brabenetz at bearingpoint.com> | <http://www.bearingpoint.de>


***************************************************************************************************
The information in this email is confidential and may be legally privileged.  Access to this email by anyone other than the intended addressee is unauthorized.  If you are not the intended recipient of this message, any review, disclosure, copying, distribution, retention, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful.  If you are not the intended recipient, please reply to or forward a copy of this message to the sender and delete the message, any attachments, and any copies thereof from your system.
***************************************************************************************************



More information about the opencms-dev mailing list