[opencms-dev] cms:link issue in offline project

Legasa Xabier Xabier.Legasa at panoptic.biz
Mon Jan 25 12:02:21 CET 2010


Hi Mario, 

I just solved this issue: I had this in my Apache configuration which I had not seen before: 

ProxyPass  /myDocuments  http://whateverserver/myDocuments
ProxyPassReverse / myDocuments  http://whateverserver/myDocuments

So my link in online project worked fine /exports/... but because in the offline project my link started by /myDocuments/... Apache was trying to serve this resource from my other server! 

This was a BIG BIG causality but fortunately I find out the issue. So nothing wrong with cms:link tag, my mistake;-) 

Thanks a lot Mario!
Xabi 




-----Original Message-----
From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Mario Jäger
Sent: 25 January 2010 11:49
To: The OpenCms mailing list
Subject: Re: [opencms-dev] cms:link issue in offline project

Hi Xabi,

Links in the offline and in the online project may differ. In the offline project the VFS resources are 
linked. If you use the org.opencms.staticexport.CmsOnDemandStaticExportHandler, in the online project is 
checked if the linked resource has to be exported. If the resource has to be exported, than the the export 
path is linked, otherwise the VFS resource is linked. 

You write that your link in the offline project does not work. What does it mean? Is there no link created
or is there an error when you follow the link?

-- 
Kind Regards,
Mario.
 
-------------------
Mario Jäger
 
Alkacon Software GmbH  - The OpenCms Experts                    
http://www.alkacon.com - http://www.opencms.org


Legasa Xabier schrieb:
>
> Hello,
>
> Ive a problem with <cms:link> tag. This code:
>
> *<cms:link>*/myDocuments/whatever.doc*</cms:link>* or this other (same 
> behaviour I believe): 
> out.println(*actionElement.link*("/myDocuments/whatever.doc "));
>
> Gives this html code in the Online project: <a 
> href="*/export/sites/intranet/*myDocuments/whatever.doc" ... /> (This 
> works ok)
>
> And this in the Offline project: <a href="/myDocuments/whatever.doc" 
> ... /> (this doesn't work!)
>
> Am I right if I say that both links should be equal in offline and in 
> online project ? And if so, please, any tips around this behaviour or 
> how to fix it would be really appreciated.
>
> Thanks,
>
> Xabi
>
> (My opencms-importexport.xml file says:)
>
> ...
>
> <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=".pdf"/>
>
> <suffix key=".txt"/>
>
> <suffix key=".css"/>
>
> <suffix key=".zip"/>
>
> <suffix key=".swf"/>
>
> </defaultsuffixes>
>
> <rendersettings>
>
> <rfs-prefix>${CONTEXT_NAME}/export</rfs-prefix>
>
> <vfs-prefix>${CONTEXT_NAME}</vfs-prefix>
>
> <userelativelinks>false</userelativelinks>
>
> <exporturl>http://127.0.0.1:8180${CONTEXT_NAME}/handle404</exporturl 
> <http://127.0.0.1:8180$%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>
>
> ...
>
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> 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

_______________________________________________
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



More information about the opencms-dev mailing list