This issue has been created
There is 1 update.
 
 
Book Versions / cid:jira-generated-image-avatar-9b1bea86-3966-48b4-a1c9-8e621f4efb07 BVERSION-113 Open

Selecting a version when on unversioned page doesn't set the right version page reference

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-7562b37d-7e64-48cd-ab03-c8989d9c0f3e Mathieu Pace created this issue on 24/Jan/25 15:04
 
Summary: Selecting a version when on unversioned page doesn't set the right version page reference
Issue Type: cid:jira-generated-image-avatar-9b1bea86-3966-48b4-a1c9-8e621f4efb07 Bug
Assignee: Unassigned
Created: 24/Jan/25 15:04
Labels: priority
Priority: cid:jira-generated-image-static-major-22bf5bff-8b6b-4bf2-b233-59feb50a3b4a Major
Reporter: Mathieu Pace
Description:

Reproduction

  1. Have a book with two versions
  2. Create a new unversioned page
  3. Switch between versions with the selector

Result

If you use the following snippet, you'll see that the saved selected version in the user session has been changed wrongly by including the query parameters

{{velocity}}
|=Att name|=Att value
#foreach($att in $request.getSession().getAttributeNames())
  |$att|$request.getSession().getAttribute($att)
#end
{{/velocity}}

This is an example that I got:

Unknown macro: {TopBook.WebHome=masterw}

Also, the URL cumulates the "unVersion" query parameters.

Expectation

The version reference shouldn't have query parameters and the URL shouldn't have many of them (maybe using the query parameter is useless since BVERSION-94 modifications)

 
 

1 update

 
cid:jira-generated-image-avatar-7562b37d-7e64-48cd-ab03-c8989d9c0f3e Changes by Mathieu Pace on 24/Jan/25 15:05
 
Description: h1. Reproduction
# Have a book with two versions
# Create a new unversioned page
# Switch between versions with the selector

h1. Result

If you use the following snippet, you'll see that the saved selected version in the user session has been changed wrongly by including the query parameters
{code:java}
{{velocity}}
|=Att name|=Att value
#foreach($att in $request.getSession().getAttributeNames())
  |$att|$request.getSession().getAttribute($att)
#end
{{/velocity}}{code}
This is an example that I got:
{quote}
{ TopBook.WebHome=masterw:TopBook.v1?unVersion=TopBook.v2?unVersion=TopBook.v1 }
{quote}
Also, the URL cumulates the "unVersion" query parameters.
h1. Expectation

The version reference shouldn't have query parameters and the URL shouldn't have many of them (maybe using the query parameter is useless since BVERSION-94 modifications)