This issue has been created
There are 2 updates.
 
 
Book Versions / cid:jira-generated-image-avatar-6260ba88-c3ac-4c8d-b1fa-6e0a062a3ac1 BVERSION-30 Open

Selected version is changed during navigation to a page without existing selected version content

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-0d0ae856-e92e-448b-bca0-1d3ad28d86a1 Mathieu Pace created this issue on 05/Dec/24 15:43
 
Summary: Selected version is changed during navigation to a page without existing selected version content
Issue Type: cid:jira-generated-image-avatar-6260ba88-c3ac-4c8d-b1fa-6e0a062a3ac1 Bug
Affects Versions: 1.0
Assignee: Unassigned
Created: 05/Dec/24 15:43
Priority: cid:jira-generated-image-static-major-f2a85c5e-699f-477c-8b68-303a07eabdb9 Major
Reporter: Mathieu Pace
Description:

Reproduction

  1. Create a book with:
    1. version 1
    2. version 2, preceding version is version 1
  2. Create pages for this book
    1. First page with content for the 2 versions
    2. Second page with content for the 2 versions
    3. Third page with only version for version 1 (it will need to select version 1 before creating the page)
  3. Go to the first page and select version 2
  4. Go to the second page
    1. The version 2 is selected in the dropdown menu => expected result
    2. The content from version 2 is displayed => expected result
  5. Go to the third page
    1. The version 1 is selected in the dropdown menu => unexpected result, it should remain on version 2
    2. The content from version 1 is displayed =>  expected result
    3. If you use the following snippet, you'll see that the saved selected version in the user session has been changed to version 1 
      {{velocity}}
      |=Att name|=Att value
      #foreach($att in $request.getSession().getAttributeNames())
        |$att|$request.getSession().getAttribute($att)
      #end
      {{/velocity}}
  1. Go back to the first page
    1. The version 1 is selected in the dropdown menu => unexpected result, it should remained on version 2
    2. The content from version 1 is displayed =>  unexpected result, it should have displayed version 2
 
 

2 updates

 
cid:jira-generated-image-avatar-0d0ae856-e92e-448b-bca0-1d3ad28d86a1 Changes by Mathieu Pace on 05/Dec/24 15:44
 
Description: h1. Reproduction

Note: you can import the attached book. to avoid creating the pages yourself
# Create a book with:
## version 1
## version 2, preceding version is version 1
# Create pages for this book
## First page with content for the 2 versions
## Second page with content for the 2 versions
## Third page with only version for version 1 (it will need to select version 1 before creating the page)
# Go to the first page and select version 2
# Go to the second page
## The version 2 is selected in the dropdown menu => expected result
## The content from version 2 is displayed => expected result
# Go to the third page
## The version 1 is selected in the dropdown menu => {*}unexpected result{*}, it should remain on version 2
## The content from version 1 is displayed =>  expected result
## If you use the following snippet, you'll see that the saved selected version in the user session has been changed to version 1 
{code:java}
{{velocity}}
|=Att name|=Att value
#foreach($att in $request.getSession().getAttributeNames())
  |$att|$request.getSession().getAttribute($att)
#end
{{/velocity}}{code}

# Go back to the first page
## The version 1 is selected in the dropdown menu => {*}unexpected result{*}, it should remained on version 2
## The content from version 1 is displayed =>  {*}unexpected result{*}, it should have displayed version 2
Attachment: newBook2.WebHome.xar