Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.10.2
-
None
-
None
-
Windows 8.1, Java 8u45
Description
- 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:
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 ); } } }