AW: [opencms-dev] publish deleted resources

Ørnulf Risnes ornulf.risnes at nsd.uib.no
Thu Feb 26 13:12:01 CET 2004


Patching CmsObject worked fine.

Thank you.

Ørnulf Risnes



Petr Hollay wrote:

> Hi,
> the problem is that in CmsObject 5.0.x is bug, in CmsObject class.
> 
> See method:  public int publishResource(String resourcename, boolean
> justPrepare, I_CmsReport report).
> 
> Instead of readFileHeader(resourcename) should be used
> readFileHeader(resourcename, true) - true is for boolean includeDeleted
> parameter,
> Which is needed for reading deleted resources.
> 
> It is working in Explorer only because in workplace class
> com.opencms.workplace.CmsPublishResource is file read using this flag, 
> see line 310:
>   cms.readFileHeader(resourceName, true)
> Then is this file stored in cache of ResourceBroker. Of course only until
> caches are deleted, what can happen at any time.
> 
> We've corrected this for us long time ago, so I've created bug entry #253 in
> Bugzilla for this issue now:
> http://www.opencms.org/bugzilla/show_bug.cgi?id=253
> 
> It should be corrected in next version of 5.0.x (5.0.2), but you can patch
> CmsObject on your own as well.
> 
> 
> Best regards
> Petr
> 
> 
> 
> ________________________________________
> Von: opencms-dev-admin at opencms.org [mailto:opencms-dev-admin at opencms.org] Im
> Auftrag von Campione Aldo
> Gesendet: Mittwoch, 25. Februar 2004 15:03
> An: opencms-dev at opencms.org
> Betreff: [opencms-dev] publish deleted resources
> 
> Doed anybody know how to publish a deleted resource via OpenCMS api's ?? 
> I've tried the method publishResources of the CmsObject but if a resource is
> deleted it doesn't work !! 
> Thank you 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev



More information about the opencms-dev mailing list