Search code examples
liferayhookliferay-6

Liferay 6.2 Hook deployment strange behaviour


I have deployed a document library hook which includes many jsp files under custom_jsps.

Recently, I wanted to change folder_action.jsp, so I changed it and deployed it normally in document library portlet. As it was expected, a folder_action.portal.jsp was created containing the original file.

However, I've noticed something strange. After stopping Tomcat both folder_action.jsp and folder_action.portal.jsp are deleted(this is not happening for the other files that come from the hook), and when it is up again a really strange thing happens. The folder_action.portal.jsp contains the changed file and the folder_action.jsp is the original file.

Has anyone met something similar ever? Any help would be appreciated.


Solution

  • You might run into a very nasty issue: You must only override a particular jsp from exactly one hook. If you override the same jsp from two different hooks, the scenario that you describe might happen (on undeploy). Worse: Order is not maintained, you might have some "wrong" files left over.

    Find the two hooks that override the same jsp and determine which you like better (or merge the two). Find some more horror in this answer to a similar question