updates for fixing error when new content type is added when editing an existing page in page management (previously, data getter URI was checked for each content section/data getter URI, and this was resulting in an error when new content section/data getter was added in edit mode).
This commit is contained in:
parent
e8840bdc23
commit
71cdc0ae52
1 changed files with 9 additions and 4 deletions
|
@ -250,12 +250,17 @@ public class ManagePagePreprocessor extends
|
|||
|
||||
//To get data getter uris, check if editing an existing set and include those as form inputs
|
||||
if(editConfiguration.isParamUpdate()) {
|
||||
//Although this is editing an existing page, new content might have been added which would not include
|
||||
//existing data getter URIs, so important to check whether the key exists within the json object in the first place
|
||||
if(jsonObject.containsKey("URI")) {
|
||||
String URIValue = jsonObject.getString("URI");
|
||||
if(URIValue != null) {
|
||||
log.debug("Existing URI for data getter found: " + URIValue);
|
||||
String dataGetterURISubmissionName = pn.getDataGetterVarName(counter);
|
||||
submission.addUriToForm(editConfiguration, dataGetterURISubmissionName, new String[]{URIValue});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue