AnsweredAssumed Answered

files in deployed jar not being used

Question asked by chrisokelly on May 15, 2012
Latest reply on May 17, 2012 by chrisokelly
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?site=it-intranet&format=calendar 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-intranet&format=calendar 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['site']}.ics?site=${page.url.templateArgs['site']}&format=calendar" 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 :p

Outcomes