[ https://issues.apache.org/jira/browse/JSPWIKI-936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15241750#comment-15241750 ]
Harry Metske commented on JSPWIKI-936: -------------------------------------- The error that occurs is {noformat} JSPWiki has detected an error Error Message Refmgr out of sync: page Test refers to Test/fstab, which has null referrers. Exception org.apache.wiki.InternalWikiException Place where detected org.apache.wiki.ReferenceManager.pageRemoved(), line 625 If you have changed the templates, please do check them. This error message may show up because of that. If you have not changed them, and you are either installing JSPWiki for the first time or have changed configuration, then you might want to check your configuration files. If you are absolutely sure that JSPWiki was running quite okay or you can't figure out what is going on, then by all means, come over to jspwiki.apache.org and tell us. There is more information in the log file (like the full stack trace, which you should add to any error report). And don't worry - it's just a computer program. Nothing really serious is probably going on: at worst you can lose a few nights sleep. It's not like it's the end of the world. {noformat} The doc: http://jspwiki.apache.org/apidocs/2.10.2/org/apache/wiki/ReferenceManager.html#findRefersTo(java.lang.String) however, states that the returned Collection is immutable. The patch, however, does fix the problem, any thoughts? > error when remove page with link > -------------------------------- > > Key: JSPWIKI-936 > URL: https://issues.apache.org/jira/browse/JSPWIKI-936 > Project: JSPWiki > Issue Type: Bug > Components: Core & storage > Affects Versions: 2.10.2 > Environment: Windows 8.1, Java 8u45 > Reporter: Andrew Krasnoff > > # Login > # Create new page > # Then click Attach, select file and click Upload > # Edit the page and specify link to attached file name on page content - > [attached_file_name.png] in my case. Click Save > Click Info and click "Delete Entire Page", click "Confirm" at confirmation > popup > => get error > To make a temporary fix I updated "WikiEngine.deletePage" method with the > following code: > {code:java} > public void deletePage( String pageName ) > throws ProviderException > { > WikiPage p = getPage( pageName ); > if( p != null ) > { > if( p instanceof Attachment ) > { > m_attachmentManager.deleteAttachment( (Attachment) p ); > } > else > { > Collection<String> refTo = > m_referenceManager.findRefersTo(pageName); > if (m_attachmentManager.hasAttachments( p )) > { > Collection attachments = > m_attachmentManager.listAttachments( p ); > for( Iterator atti = attachments.iterator(); > atti.hasNext(); ) > { > Attachment attachment = (Attachment)atti.next(); > refTo.remove(attachment.getName()); > m_attachmentManager.deleteAttachment( attachment ); > } > } > m_pageManager.deletePage( p ); > firePageEvent( WikiPageEvent.PAGE_DELETED, pageName ); > } > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)