[MAGNOLIA-1697] DialogFckEdit.convertToView() doesn't properly add contextPath to dms links Created: 23/Aug/07  Updated: 23/Jan/13  Resolved: 07/Nov/07

Status: Closed
Project: Magnolia
Component/s: gui
Affects Version/s: 3.1 M3
Fix Version/s: 3.5 RC1

Type: Bug Priority: Major
Reporter: Tom Jensen Assignee: Philipp Bärfuss
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File DialogFckEdit.patch    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

At line 365 in DialogFckEdit.convertToView() there is a check to determine whether a UUIDLink instance is a link to a binary or not by checking for a NodeData object associated with it.

if (uuidLink.getNodeData() == null) {

This will always cause UUIDLink objects that are from the dms to generate incorrect links. The contextPath will never be added to the link.

Nodes in the dms don't use NodeData objects like the website, or at least the DMSDownloadServlet doesn't work the same.



 Comments   
Comment by Tom Jensen [ 23/Aug/07 ]

If the only workspaces that need to be taken into consideration ever with this code are the website and dms then the easy fix would be to just check to see if there is nodeData or if the workspace is the dms.

That seems too easy though .

I'm assuming that portability across any possible workspace is desired? If that's the case then I'm not sure what the solution would be.

Comment by Tom Jensen [ 23/Aug/07 ]

Here is a suggested fix to this issue. There is a new variable, binaryRepositories, that is checked against to determine if a particular UUIDLink is in one of those. If it is, the context path is added, if not, and the nodeData is null, then no context path is added. The default is set to the dms, but setting the binaryRepositories value to a comma delimited list of repositories that contain binary files will override that.

Comment by Philipp Bracher [ 07/Nov/07 ]

Is fixed by MAGNOLIA-1807

Generated at Mon Feb 12 03:29:26 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.