-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.0.X, 7.1.X, 7.2.X, Master
-
Fix Version/s: 7.0.0 DXP FP94, 7.0.10.15 DXP SP15, 7.0.X, 7.1.10 DXP FP19, 7.1.10.5 SP5, 7.1.X, 7.2.10 DXP FP8, 7.2.10.3 DXP SP3, 7.2.X, 7.3.4 CE GA5, 7.3.10 DXP GA1, 7.4.13 DXP GA1, Master
-
Component/s: Dynamic Data Mapping
-
Branch Version/s:7.2.x, 7.1.x, 7.0.x
-
Backported to Branch:Committed
-
Fix Priority:3
-
Sprint:Data_Engine_7.3_34
-
Git Pull Request:
As a developer, I want to overwrite an TemplateHandler using service ranking (ex: JournalTemplateHandler).
The TemplateHandlerRegistryImpl ignores the ranking of service and it records Handler by calling addTemplateHandler order.
It does not reflect the order of service activation.
If the default JournalTemplateHandler is recorded after my custom Handler it is ignored.
The order seems random and it does not seem possible to fix it by inject any dependencies into custom bundle.
Is there a way to overwrite an TemplateHandler ?
Steps to Reproduce:
- Create a custom module adding CustomJournalTemplateHandler (template.handler.test.jar
can be used).
- Deploy the module in the server.
- Restart the server.
- Execute the following Groovy script and check that CustomJournalTemplateHandler appears.
for(th in com.liferay.portal.kernel.template.TemplateHandlerRegistryUtil.getTemplateHandlers()) {
out.println(th);
}
Expected Result:
CustomJournalTemplateHandler should appear as it has higher service ranking than JournalArticleTemplateHandler.
Actual Result:
JournalArticleTemplateHandler appears as we are using a map to save the handlers ignoring the priority.
- relates
-
LPS-117897 The plus icon button doesn't work in Widget Templates popup of Tags Navigation portlet
- Closed