When using ModalWindow in combination with PageReference does not work since version 8.0.0-M6.
I tried 8.0.0-M5 as well without getting this issue.
Using the example code of wicket-examples, the call (ModalWindowPage)modalWindowPage.getPage() will always return null instead of the page.
The PageReference object contains a valid pageId, but the PageManager cannot find the object referenced by this ID.
I attached an example project to show this issue
(use mvn clean compile jetty:run to start local webserver on 8080).
I'm also pretty sure that this problem will also occur with the wicket-example code.
My example is just a stripped version of the wicket-examples modal window sample which will throw an IllegalArgumentException when getPage() is null.