Skip to content

Commit caa72c1

Browse files
st-manuern
authored andcommitted
SAK-50363 Resources: Link migration not working for URL content (#13548)
(cherry picked from commit 358968c)
1 parent ff2c250 commit caa72c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/kernel-impl/src/main/java/org/sakaiproject/content/impl/BaseContentService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7487,6 +7487,7 @@ public void updateEntityReferences(String toContext, Map<String, String> travers
74877487
ContentResource oldSiteContentResource = getResource(oldReference);
74887488
byte[] thisResourceContentRaw = oldSiteContentResource.getContent();
74897489
rContent = new String(thisResourceContentRaw);
7490+
StringBuffer saveOldEntity = new StringBuffer(rContent);
74907491
for (String oldValue : traversalMap.keySet()) {
74917492
if (!oldValue.equals("/fromContext")){
74927493
String newValue = "";
@@ -7501,7 +7502,6 @@ public void updateEntityReferences(String toContext, Map<String, String> travers
75017502
} catch (Exception e) {
75027503
log.debug ("Forums LinkMigrationHelper.editLinks failed: {}" + e.toString());
75037504
}
7504-
StringBuffer saveOldEntity = new StringBuffer(rContent);
75057505
try {
75067506
if(!saveOldEntity.toString().equals(rContent)){
75077507
ContentResourceEdit edit = editResource(tId);

0 commit comments

Comments
 (0)