Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-5499

Page is not touched during initialization

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      After migration from 6.12.0 to 6.13.0 our app stopped working.
      I figured out that there is a new condition in Page#dirty(final boolean isInitialization) on line 288:

      if (isInitialization == false)
      {
      pageManager.touchPage(this);
      }

      That means that nely constructed page does not get touched thus is not stored in page store.
      The problem is that when I do something like this

      printPage = new PrintPage(event.getFormId(), event.getFormData());
      PageProvider pp = new PageProvider(printPage);
      RenderPageRequestHandler rh = new RenderPageRequestHandler(pp);
      CharSequence url = RequestCycle.get().urlFor(rh);

      I get an URL pointing to page with id X - but that page is not found because it was not stored and I ends with nonsense PageExpired exception.

      I notice that 6.13.0 version fixed some bugs with stateless / statefull pages, etc. so that may be the cause. Nevertheless I think it's a bug.
      If you do not want to touch page during creation, then it must get touched whenever it is involved in some request handler.

      Attachments

        1. WICKET-5499.patch
          1 kB
          Sven Meier
        2. WICKET-5499-2.patch
          4 kB
          Martin Tzvetanov Grigorov

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mgrigorov Martin Tzvetanov Grigorov
            davesman David Rain
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment