I can’t reproduce on a clean XWiki 11.9 instance. Here’s what I did:
I created a new plain wiki page Foo then I edited it with the class editor and I added a single property named “page” of type Page. I left the default Page property settings, except for Display Type which I changed from select to input, in order to have the input suggest picker.
I added an object of type Foo to the Foo page
in the content of the Foo page I put this:
{{velocity}}$doc.display('page'){{/velocity}}
I created another page named "Bar " (with a space at the end)
I edited the Foo page using the “Inline Form” edit mode
I typed “bar” into the page picker and selected the suggestion corresponding to the Bar page
I saved. The URL was OK.
I edited again the Foo page in “Inline Form” edit mode and I saved without changes. The URL was still OK.
Repeated this after enabling multiple selection on the page property. Still OK.
That sounds about right. I’m on version 10.11.9, so maybe this was corrected on a release? I have this problem with every page element on the various app within minutes aps that I have (and I have many).
ETA: Come to think of it, it’s not the same.
The differences that I see with your example is that you’re aren’t using AppWithinMinutes to create your class, and I am for all of mine. Additionally, I am limiting the choices for the input by either using an AppWithinMinutes generated class name (for an app that I created) or I use a custom HQL call.
In a nutshell, the Page Picker is trying to use a listing of pages for a particular AppWithinMinutes class.
Additionally, there is another bug that if the field is null, using $doc.display(‘page’) will not leave an empty space in view mode, it will put a link to the home page of the AppWithinMinutes app.