Aha! Harry, good catch!
I have noticed that there does not seem to be any way to rename
anything with ContrntManager, either, which is causing PageRenamer etc
to fail.
The good news, I think, is that a large number of errors seem to be
caused by only a few bugs.
Andrew
On Apr 11, 2009, at 6:18, Harry Metske <[email protected]> wrote:
The event handling looks good, SearchManager handles the
PAGE_DELETE_REQUEST
event properly.
The root cause is that there is no VersionHistory support yet.
When calling ContentManager.getAllPages(), you get duplicate pages
in the
returned List, when trying to delete these, only the first one (of
course)
succeeds, when trying to delete the second one you get the mentioned
Exception.
Harry
2009/4/10 Janne Jalkanen <[email protected]>
We've got two event for delete - one which is DELETE_REQUEST and
one which
is actual DELETED. The removal of the page occurs between these
two. It
looks like SearchManager might be subscribing to the wrong event
and as a
result, accessing the page after it has been already removed.
Now, 2.x does not really care, since it's possible to access the
page after
its deletion since WikiPage is still live even if its contents
aren't. 3.0
is a lot stricter in this regard.
/Janne
On 10 Apr 2009, at 20:30, Harry Metske wrote:
the WikiEngineTest also reports a lot of these errors (because it
happens
in
the tearDown method) :
Page removed already!?!
org.apache.wiki.InternalWikiException: Page removed already!?!
at
org.
apache.
wiki.search.SearchManager.actionPerformed(SearchManager.java:388)
at
org.apache.wiki.event.WikiEventManager
$WikiEventDelegate.fireEvent(WikiEventManager.java:568)
at
org.
apache.wiki.event.WikiEventManager.fireEvent(WikiEventManager.java:
349)
at
org.
apache.wiki.content.ContentManager.fireEvent(ContentManager.java:
1079)
at
org.
apache.wiki.content.ContentManager.deletePage(ContentManager.java:
827)
at org.apache.wiki.TestEngine.emptyRepository(TestEngine.java:198)
at org.apache.wiki.WikiEngineTest.tearDown(WikiEngineTest.java:74)
Caused by: org.apache.wiki.content.PageNotFoundException:
Main:mrmxyzptlk
at
org.apache.wiki.content.ContentManager.getPage(ContentManager.java:
1183)
at org.apache.wiki.WikiEngine.getPage(WikiEngine.java:1961)
at org.apache.wiki.WikiEngine.getPage(WikiEngine.java:1955)
at
org.
apache.
wiki.search.SearchManager.actionPerformed(SearchManager.java:382)
Is this because the page was never added to the SearchEngine to be
indexed
?
Or is there a double delete somewhere ?
Harry