cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to update html template file

baki1983
Champ on-the-rise
Champ on-the-rise

Hi,

I'm trying to update my-tasks.get.html.ftl file on one of my Tomcat, but I when I log in I cannot see any changes. I'm simply trying to add another button (<span> element) in this file, and I have uploaded the modified version inside :

d:\alfresco-community\tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\dashlets\

But it doesn't work - old content is still shown. When I log out and log in again, I can still see the old version of my dashlet. I've tried everything :

- restarted Tomcat - nothing

- removed and re-added dashlet again - still the same

- went to share/page/index and clicked "Refresh Web Scripts" blue button at the bottom - still the same

- went to alfresco/service/index and clicked on the same button - again, not updated

i haven't modified anything else.

Am I missing something? How can I update this HTML presentation part of my tasks dashlet?

I'm using Alfresco Community 5.2 installed on Windows 7 as a service.

Thanks in advance

1 ACCEPTED ANSWER

baki1983
Champ on-the-rise
Champ on-the-rise

Just realized problem was smth completely else. I tottaly forgot I had an extra share JAR module installed (it's in WEB-INF\lib under share) and it had another copy of this file, clearly unmodified. This version takes presence over anything that's inside share.war (and tomcat\shared as well). This copy didn't show in my file searches because it was inside JAR file (module).

I can now finally close this thread.

View answer in original post

12 REPLIES 12

douglascrp
World-Class Innovator
World-Class Innovator

After you start the service, if you navigate into that folder, do you still see your changed file in there?

I am asking you this because you are changing a file directly inside the share app (share expanded folder or share.war), and that is not a good practice, as when Tomcat starts, it can redeploy the application, and have your file removed.

The right thing to do is to extend the ftl file using the extension method.

A quick test is to move your changed file into the following path:

d:\alfresco-community\tomcat\shared\classes\alfresco\web-extension\alfresco\site-webscripts\org\alfresco\components\dashlets\

Do this, restart the service and try again.

baki1983
Champ on-the-rise
Champ on-the-rise

Hi Douglas,

Yup, still there...hasn't been overwritten. Share.war is always present and since the war file is already exploded, Tomcat will persist my changes in files across restarts.

I've tried to move the file as you suggested (created all the missing directories) and still the same - new content simply won't load. Tried to restart, refresh web scripts - no luck. Interestingly, when I run my demo project over maven (using mvn alfresco:run) I can always see my changes.

Do I need to re-create share.war and re-deploy on the server? What if I enable Tomcat manager and reload the share webapp, would that help? 

Thanks

douglascrp
World-Class Innovator
World-Class Innovator

What folders you had to create, exactly?

baki1983
Champ on-the-rise
Champ on-the-rise

web-extension folder didn't have any subfolders inside (it had only one file custom-slingshot-application-context.xml.sample). I had to create the whole path under web-extension alfresco\site-webscripts\org\alfresco\components\dashlets

The whole path now looks like this :

d:\alfresco-community\tomcat\webapps\share\WEB-INF\classes\alfresco\web-extension\alfresco\site-webscripts\org\alfresco\components\dashlets\my-tasks.get.html

Do I need to create a module instead using maven and deploy it to Alfresco?