cancel
Showing results for 
Search instead for 
Did you mean: 

files in deployed jar not being used

chrisokelly
Champ on-the-rise
Champ on-the-rise
Hi,

I have been having a problem with the iCal feed button in the Share calendar (from a brief look at the forums it appears I am not alone). The issue is that the button directs to (for instance) https://alfresco.company.local:8443/share/proxy/alfresco-feed/calendar/eventList-it-intranet.ics?sit... in share, resulting in a blank page and no prompt to download an ics file. https://alfresco.company.local:8443/alfresco/service/calendar/eventList-it-intranet.ics?site=it-intr... works perfectly, so it seemed to me it would be simple to change the ftl file for calendar pages to direct to the latter URL instead. I copied the $TOMCAT_HOME/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/calendar/toolbar.get.html.ftl into a dev environment on it's own.

I opened the file in vi and changed lines 56-60 from
      <div class="yui-u flat-button">
         <div class="ical-feed">
            <a id="${el}-publishEvents-button" href="${page.url.context}/proxy/alfresco-feed/calendar/eventList-${page.url.templateArgs["site"]}.ics?site=${page.url.templateArgs["site"]}&amp;format=calendar" rel="_blank">${msg("button.ical")}</a>
         </div>
      </div>
to
      <div class="yui-u flat-button">
         <div class="ical-feed">
            <a id="${el}-publishEvents-button" href="https://alfresco.company.local:8443/alfresco/service/calendar/eventList-${page.url.templateArgs['sit..." rel="_blank">${msg("button.ical")}</a>
         </div>
      </div>
(as an aside, I have looked through the various api pages on the wiki and cannot find an alternative to page.url.context for just the proto, hostname and port. Does anyone know of one (I know I can used the javascript location porperty but it does not work for alot of webscripts run by the server, as it relies on the window object. In this case I have just hardcoded it for simplicities sake.))

Once built, this resides in the jar file at core-changes.jar!/alfresco/site-webscripts/org/alfresco/components/calendar/toolbar.get.html.ftl and I have deployed it to $TOMCAT_HOME/shared/lib, however, on server restart, the calendar page is unchanged. I was under the impression I was following the correct practice to override a file but I am still very fresh to Alfresco. Can anyone point out what I have missed here?

I don't think it applies very much for this issue, but in case, our environment is Ubuntu, tomcat, postgres, community 4.0.d

Edit : : missing ) in parenthetical Smiley Tongue
2 REPLIES 2

hunjet
Champ in-the-making
Champ in-the-making
Hi chrisokelly,

Recently I had the same problem with overriding template files and I solved it by putting file at different location inside jar.

Instead core-changes.jar!/alfresco/site-webscripts/org/alfresco/components/calendar/toolbar.get.html.ftl
try core-changes.jar!/alfresco/web-extension/site-webscripts/org/alfresco/components/calendar/toolbar.get.html.ftl.

Take a look at the following post: https://forums.alfresco.com/en/viewtopic.php?f=5&t=43249

Regards,
Blaž

chrisokelly
Champ on-the-rise
Champ on-the-rise
Works perfectly. Thank you very much!