Details
-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
Description
This happened with a link to a resource not existing anymore in the dms repository, although it can't be reproduced easily:
java.lang.NullPointerException at java.util.regex.Matcher.getTextLength(Unknown Source) at java.util.regex.Matcher.reset(Unknown Source) at java.util.regex.Matcher.<init>(Unknown Source) at java.util.regex.Pattern.matcher(Unknown Source) at info.magnolia.module.fckeditor.dialogs.FckEditorDialog.convertToView(FckEditorDialog.java:407) at info.magnolia.module.fckeditor.dialogs.FckEditorDialog.drawHtml(FckEditorDialog.java:281) at info.magnolia.cms.gui.dialog.DialogControlImpl.drawSubs(DialogControlImpl.java:322) at info.magnolia.cms.gui.dialog.DialogControlImpl.drawHtml(DialogControlImpl.java:166)
fckedit crashes during link resolving and the dialog can't be open anymore. Looking at the code it seems LinkUtil.convertUUIDsToEditorLinks(value) returns a null value and the following regexp fails:
public String convertToView(String value) {
if (value != null) {
// we have to add the context path for images and files but not for pages!
value = LinkUtil.convertUUIDsToEditorLinks(value);
// this section is for backward compatibility - see MAGNOLIA-2088
final Matcher matcher = LinkHelper.LINK_OR_IMAGE_PATTERN.matcher(value);
it may worth to add a simple null check before the additional replacement...
Checklists
Attachments
Issue Links
- is related to
-
MAGNOLIA-2865 Internal Page link in fckEdit: When the target of an internal link is removed, the fckEdit throws an error.
-
- Closed
-
- is superseded by
-
MAGNOLIA-2862 if some paragraph contains a link /using fckEdit control/ to deleted page, the paragraph's dialog window isn't rendered and the error appears
-
- Closed
-
-
MAGNOLIA-2872 Further improve/consolidate Link api
-
- Closed
-