02-16-2018 06:52 AM
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
02-22-2018 10:24 AM
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.
02-16-2018 03:27 PM
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.
02-17-2018 03:55 AM
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
02-17-2018 04:25 PM
What folders you had to create, exactly?
02-18-2018 01:08 AM
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?
Explore our Alfresco products with the links below. Use labels to filter content by product module.