[MGNLDMS-235] Make the dms component 4.5 compatible Created: 15/Jun/12  Updated: 08/Aug/16  Resolved: 08/Aug/16

Status: Closed
Project: Document Management System (closed)
Component/s: None
Affects Version/s: 1.6
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Zdenek Skodik Assignee: Unassigned
Resolution: Obsolete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
relation
is related to MGNLDMS-148 Move logic of dms.jsp to a model class Closed
Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

While the definition was changed accordingly, the script dms.jsp script was not. The component can't be used in its present form even with compatibility modules in place, since produces a bunch of exceptions, a class cast one for example.



 Comments   
Comment by Oliver Knorr [ 13/Jun/14 ]

After upgrading from 4.4.6 to 4.5.12, I also ran in to this issue. I did the following to fix it:

1. Change the following line:
Content content = (Content) pageContext.getAttribute("content", PageContext.REQUEST_SCOPE);
to this:
ContentMap content = (ContentMap) pageContext.getAttribute("content", PageContext.REQUEST_SCOPE);
and of course add an import for info.magnolia.jcr.util.ContentMap.

2. The i18n support in the following three lines also cause problems:
String link = I18nContentSupportFactory.getI18nSupport().getNodeData(content, "link").getString();
String extension = I18nContentSupportFactory.getI18nSupport().getNodeData(content, "extension").getString();
String query = I18nContentSupportFactory.getI18nSupport().getNodeData(content, "query").getString();
Sorry, I don't know how this can be fixed. So I just removed the i18n support like this:
String link = (String) content.get("link");
String extension = (String) content.get("extension");
String query = (String) content.get("query");

I don't offer a patch file for this as the i18n issue should rather be properly fixed but I don't know how...

Generated at Mon Feb 12 00:49:42 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.