[opencms-dev] Import of module changed files marked as published but not updated online

Christian Bjørnbak cbj at touristonline.dk
Sat Nov 30 21:54:20 CET 2013


I've found the bug!

The clearCaches method called in the shell fires an event but as CmsShell
and the tomcat running the server are running in different VM's no one ever
catches the event..

This is at least true on Linux don't know if it's different on Windows?

Does anyone know of a way to trigger clearCache on the server without
logging in to workplace?


Med venlig hilsen / Kind regards,

Christian Bjørnbak

Chefudvikler / Lead Developer
TouristOnline A/S
Islands Brygge 43
2300 København S
Denmark
TLF: +45 32888230
Dir. TLF: +45 32888235


2013/11/30 Christian Bjørnbak <cbj at touristonline.dk>

> I've now extended the cmsshell with a class to trigger synchronize and
> experience the same here. This convince me that this is a bug in opencms.
>
> I'm changing bootstrap-template.jsp in the external directory and trigger
> synchronize with cmsshell script:
>
>             login Admin admin
>             setCurrentProject Offline
>             synchronize
>             publishProjectAndWait
>             exit
>
> The synchronize method has the following content:
> public void synchronize() {
> I_CmsReport vI_CmsReport = new
> CmsShellReport(mCmsObject.getRequestContext().getLocale());
>
> CmsUserSettings vCmsUserSettings = new CmsUserSettings(mCmsObject);
>
> CmsSynchronize vCmsSynchronize = null;
>  try {
> vCmsSynchronize = new CmsSynchronize(mCmsObject,
> vCmsUserSettings.getSynchronizeSettings(), vI_CmsReport);
>  } catch (CmsException e) {
> e.printStackTrace();
> return;
>  }
>
> System.out.println((vCmsSynchronize.getCount()-1)+" files synchronized.");
>  }
>
> The output from the method tells me that the changed file is published and
> the file is (still) marked as published but the Date Last Modified column
> in workplace isn't updated. If I do a Edit Source I see the changes.
>
> If I leave out publishProjectAndWait the status change to Unpublished
> isn't discovered in workplace unless I log out and back in or open the file
> with Edit Source.
>
> As publish do detect the file for publishing I'm uncertain if that
> workplace doesn't pickup the change is a minor side problem or it's part of
> the core problem?
>
> Is this a bug or do I need to trigger a cache eviction or something?? I
> tried with clearCaches and purgeJspRepository without luck.
>
>
> Med venlig hilsen / Kind regards,
>
> Christian Bjørnbak
>
> Chefudvikler / Lead Developer
> TouristOnline A/S
> Islands Brygge 43
> 2300 København S
> Denmark
> TLF: +45 32888230
> Dir. TLF: +45 32888235
>
>
> 2013/11/28 Christian Bjørnbak <cbj at touristonline.dk>
>
>> Hi
>>
>> I've created a custom version of the com.alkacon.bootstrap.formatters
>> module by exporting this with
>> http://sourceforge.net/projects/opencmsantbuild/, changing the name
>> where ever it's used in directory and file names and within files and the
>> importing it again.
>>
>> But eventhough the changes is visible in workplace and the offline
>> preview and the module seems to be published the changes aren't visible
>> online.
>>
>> The above ant script generate a manifest.xml and packs the modules and
>> the calls cmsshell with following script:
>>
>> login ${opencms.username} ${opencms.password}
>>  setCurrentProject ${opencms.info.project}
>> deleteModule "${module.module.name}"
>>  importModuleFromDefault "${name.zip}"
>> exit
>>
>> This gives an output with lots of:
>>
>>   [java] Importing /system/modules/dk.touristonline.bootstrap.formatters/
>> ... o.k.
>>      [java] Importing
>> /system/modules/dk.touristonline.bootstrap.formatters/elements/ ... o.k.
>>      [java] Importing
>> /system/modules/dk.touristonline.bootstrap.formatters/formatters/ ... o.k.
>>      [java] Importing
>> /system/modules/dk.touristonline.bootstrap.formatters/functions/ ... o.k.
>>      [java] Importing
>> /system/modules/dk.touristonline.bootstrap.formatters/i18n/ ... o.k.
>>      [java] Importing
>> /system/modules/dk.touristonline.bootstrap.formatters/resources/ ... o.k.
>>      [java] Importing
>> /system/modules/dk.touristonline.bootstrap.formatters/resources/css/ ...
>> o.k.
>>
>> and
>>
>>    [java] ( 1 / 55 ) Parsing links for
>> "/system/modules/dk.touristonline.bootstrap.formatters/.config"... o.k.
>>      [java] ( 2 / 55 ) Parsing links for
>> "/system/modules/dk.touristonline.bootstrap.formatters/elements/login.jsp"...
>> o.k.
>>      [java] ( 3 / 55 ) Parsing links for
>> "/system/modules/dk.touristonline.bootstrap.formatters/elements/module-clone-action.jsp"...
>> o.k.
>>      [java] ( 4 / 55 ) Parsing links for
>> "/system/modules/dk.touristonline.bootstrap.formatters/elements/module-clone.jsp"...
>> o.k.
>>      [java] ( 5 / 55 ) Parsing links for
>> "/system/modules/dk.touristonline.bootstrap.formatters/elements/nav-breadcrumb.jsp"...
>> o.k.
>>      [java] ( 6 / 55 ) Parsing links for
>> "/system/modules/dk.touristonline.bootstrap.formatters/elements/nav-main.jsp"...
>> o.k.
>>      [java] ( 7 / 55 ) Parsing links for
>> "/system/modules/dk.touristonline.bootstrap.formatters/elements/opencms-info.jsp"...
>> o.k.
>>      [java] ( 8 / 55 ) Parsing links for
>> "/system/modules/dk.touristonline.bootstrap.formatters/formatters/blog-detail.jsp"...
>> o.k.
>>      [java] ( 9 / 55 ) Parsing links for
>> "/system/modules/dk.touristonline.bootstrap.formatters/formatters/blog-detail.xml"...
>> o.k.
>>
>> og
>>
>>    [java] Updating file
>> /system/modules/dk.touristonline.bootstrap.formatters/elements/login.jsp
>> ... o.k.
>>      [java] Updating file
>> /system/modules/dk.touristonline.bootstrap.formatters/elements/module-clone-action.jsp
>> ... o.k.
>>      [java] Updating file
>> /system/modules/dk.touristonline.bootstrap.formatters/elements/module-clone.jsp
>> ... o.k.
>>      [java] Updating file
>> /system/modules/dk.touristonline.bootstrap.formatters/elements/nav-breadcrumb.jsp
>> ... o.k.
>>      [java] Updating file
>> /system/modules/dk.touristonline.bootstrap.formatters/elements/nav-main.jsp
>> ... o.k.
>>      [java] Updating file
>> /system/modules/dk.touristonline.bootstrap.formatters/elements/opencms-info.jsp
>> ... o.k.
>>      [java] Updating file
>> /system/modules/dk.touristonline.bootstrap.formatters/formatters/blog-detail.jsp
>> ... o.k.
>>      [java] Updating file
>> /system/modules/dk.touristonline.bootstrap.formatters/formatters/blog.jsp
>> ... o.k.
>>      [java] Updating file
>> /system/modules/dk.touristonline.bootstrap.formatters/formatters/carousel.jsp
>> ... o.k.
>>      [java] Updating file
>> /system/modules/dk.touristonline.bootstrap.formatters/formatters/flexible.jsp
>> ... o.k.
>>      [java] Updating file
>> /system/modules/dk.touristonline.bootstrap.formatters/formatters/imagegalleryshow.jsp
>> ... o.k.
>>
>> and
>>
>>     [java] ( 1 / 51 ) Publishing folder
>> /system/modules/dk.touristonline.bootstrap.formatters/ ... o.k.
>>      [java] ( 2 / 51 ) Publishing folder
>> /system/modules/dk.touristonline.bootstrap.formatters/elements/ ... o.k.
>>      [java] ( 3 / 51 ) Publishing folder
>> /system/modules/dk.touristonline.bootstrap.formatters/formatters/ ... o.k.
>>      [java] ( 4 / 51 ) Publishing folder
>> /system/modules/dk.touristonline.bootstrap.formatters/functions/ ... o.k.
>>      [java] ( 5 / 51 ) Publishing folder
>> /system/modules/dk.touristonline.bootstrap.formatters/i18n/ ... o.k.
>>      [java] ( 6 / 51 ) Publishing folder
>> /system/modules/dk.touristonline.bootstrap.formatters/resources/ ... o.k.
>>      [java] ( 7 / 51 ) Publishing folder
>> /system/modules/dk.touristonline.bootstrap.formatters/resources/css/ ...
>> o.k.
>>      [java] ( 8 / 51 ) Publishing folder
>> /system/modules/dk.touristonline.bootstrap.formatters/resources/css/headers/
>> ... o.k.
>>      [java] ( 9 / 51 ) Publishing folder
>> /system/modules/dk.touristonline.bootstrap.formatters/resources/css/pages/
>> ... o.k.
>>
>> and
>>      [java] ( 1 / 462 ) Publishing file
>> /system/modules/dk.touristonline.bootstrap.formatters/.config ... o.k.
>>      [java] ( 2 / 462 ) Publishing file
>> /system/modules/dk.touristonline.bootstrap.formatters/elements/login.jsp
>> ... o.k.
>>      [java] ( 3 / 462 ) Publishing file
>> /system/modules/dk.touristonline.bootstrap.formatters/elements/module-clone-action.jsp
>> ... o.k.
>>      [java] ( 4 / 462 ) Publishing file
>> /system/modules/dk.touristonline.bootstrap.formatters/elements/module-clone.jsp
>> ... o.k.
>>      [java] ( 5 / 462 ) Publishing file
>> /system/modules/dk.touristonline.bootstrap.formatters/elements/nav-breadcrumb.jsp
>> ... o.k.
>>      [java] ( 6 / 462 ) Publishing file
>> /system/modules/dk.touristonline.bootstrap.formatters/elements/nav-main.jsp
>> ... o.k.
>>      [java] ( 7 / 462 ) Publishing file
>> /system/modules/dk.touristonline.bootstrap.formatters/elements/opencms-info.jsp
>> ... o.k.
>>      [java] ( 8 / 462 ) Publishing file
>> /system/modules/dk.touristonline.bootstrap.formatters/formatters/blog-detail.jsp
>> ... o.k.
>>
>> If I open the file with Edit sourcecode, save and publish directly the
>> changes become visible online.
>>
>> I've tried with setCurrentProjekt as both Online and Offline. No
>> difference.
>>
>> I've noticed that Date last modified doesn't change in Workplace when I
>> import the module. How come? Does this have a connection to my base problem?
>>
>> Med venlig hilsen / Kind regards,
>>
>> Christian Bjørnbak
>>
>> Chefudvikler / Lead Developer
>> TouristOnline A/S
>> Islands Brygge 43
>> 2300 København S
>> Denmark
>> TLF: +45 32888230
>> Dir. TLF: +45 32888235
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20131130/22f9e5f9/attachment.htm>


More information about the opencms-dev mailing list