View Issue Details

This bug affects 2 person(s).
 16
IDProjectCategoryView StatusLast Update
17586Bug reportsSurvey takingpublic2021-09-24 14:20
ReporterMazi Assigned Togalads  
PrioritynoneSeveritypartial_block 
Status confirmedResolutionopen 
Product Version3.25.20 
Summary17586: Opening new browser tabs using question index leads to inputted data being deleted
DescriptionIn a survey that allows for full navigation back/forth using the question index, opening the different pages at new browser tabs leads to problems. If you have entered data at several pages of the survey and then move back and forth to validate your input, you might find it handy to open a new tab of your browser, showing the selected group (open the link in a new tab, while pointing to the navbar menu item). But: This clears all input of all items in the landing page - at least when it is the same page that is open already!

The tricky thing is that navigating with Next/Back-Buttons and opening new survey instances using the same token, Limesurvey recognizes this and takes care of the data in each page. So I think, the navigation-link behaviour is a bug.
Steps To ReproduceTry the steps mentioned above using the attached sample survey.

1. Opening the survey with the URL and token specified (example: https://ls3.my-survey.host/index.php/723728/token/test/lang/de/newtest/Y)

2. Entering some data to some editfields

3. Navigate to the next page with the button <Next> at the bottom right, then <back> to verify that the data has been entered (the display is the same like above).

4. Use the navigation menu (here: bottom of the page), to select the menu item of the current page (here: Test) with the right mouse button to get the context-menu of the link

5. Open a new Tab with the URL of the same contents

6. The same page is openend in a new tab, but the contents is gone

7. Navigating with the buttons in the original page will produce an error

8. The data is gone forever.
TagsNo tags attached.
Bug heat16
Complete LimeSurvey version number (& build)Version 3.27.17+210911
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMySQL 5
Server OS (if known)
Webserver software & version (if known)
PHP Version7.2.24

Users monitoring this issue

User List Mazi

Activities

Mazi

Mazi

2021-09-09 12:28

partner  

ollehar

ollehar

2021-09-09 12:30

administrator   ~66432

Old issue or regression?
Mazi

Mazi

2021-09-09 12:38

partner   ~66433

I think neither. Sounds like something new to me due to the rather special user behavior of opening the links from the index at new browser tabs.
ollehar

ollehar

2021-09-09 12:51

administrator   ~66434

I'm guessing old, then, if the same behaviour can be replicated in LS2 or 1.
Mazi

Mazi

2021-09-09 12:55

partner   ~66435

Steps to reproduce added.
Mazi

Mazi

2021-09-09 12:56

partner   ~66436

Steps to reproduce added incl. screenshots.
image001.jpg (33,067 bytes)   
image001.jpg (33,067 bytes)   
image002.jpg (10,090 bytes)   
image002.jpg (10,090 bytes)   
image003.jpg (42,830 bytes)   
image003.jpg (42,830 bytes)   
image004.jpg (29,695 bytes)   
image004.jpg (29,695 bytes)   
image005.jpg (16,416 bytes)   
image005.jpg (16,416 bytes)   
DenisChenu

DenisChenu

2021-09-10 09:56

developer   ~66442

The index link MUST be used only with javascript : there are a POST action done. With open in new tab : you break the JS action, then nothing is submitted.

There are a POST action done with link.
We must disable the href, put a false href or (better) change the to an html button.
Mazi

Mazi

2021-09-10 10:20

partner   ~66443

@DenisChenu, so if I get it right, the index is not designed to open other pages in additional tabs?

Can we make that work or is it a technical limitation?
DenisChenu

DenisChenu

2021-09-10 11:33

developer   ~66444

> Can we make that work or is it a technical limitation?

No : technical situation : open in new tab can not send other value , only GET value from the link.
WilliPuhdlich

WilliPuhdlich

2021-09-10 12:55

reporter   ~66448

I used <href="#0"> which does the job. Thanks. This solves the issue with the navigation bar.

But: If you have any Web-Link in a group of a survey and click on it, the data in the current page ist gone as well.
Imagine to have a 'table of contents' - page with URLS like
surveyhost.com/index.php/723728/lang/de/token/{TOKEN}/move/1
surveyhost.com/index.php/723728/lang/de/token/{TOKEN}/move/2

and additional data to be entered in the same page. Then, after clicking one of the URL erases all entered data in that page.
This is a different but similar bug, isn't it?
DenisChenu

DenisChenu

2021-09-10 13:43

developer   ~66449

No : use button if you want.

A link didn't submit data.
DenisChenu

DenisChenu

2021-09-10 14:11

developer   ~66450

There still an issue


1. Page 1 , go to Page 2 with next : current page save
2. Page 2 : go to page 3 with open in new tab
3. In the new tab : go to page 1 with real index : data on page 1 disappear : in theory : data muts be here.

My opinion : there are an issue with move …
https://gifyu.com/image/Jukw

Its' surely hard to fix it.
1st step is to remove the href in index and use button
WilliPuhdlich

WilliPuhdlich

2021-09-10 17:32

reporter   ~66453

You can check it here: https://puhdlich.limequery.com/723728/lang/de/newtest/Y
Enter some data in "Inhaltsverzeichnis" comment-box, press the button "next", then "back": Text is there.
Click on the link in "Inhaltsverzeichnis" or "Gruppe 1" -> The comment box will erased - text is gone.
DenisChenu

DenisChenu

2021-09-10 18:46

developer   ~66454

Can you check removing the move=X in url ?

Else : you can use <button type="submit" name="move" value="2" class="list-group-item index-item " >Test</button> but this submit current data :/
WilliPuhdlich

WilliPuhdlich

2021-09-10 20:09

reporter   ~66455

I cannot remove the move, since this is of course needed for jumping - but I checked ?move=1 against /move/1, but no difference.
I checked your button-code (see link of above for testing): The buttons does the job. You can jump to the same page and no data is lost.
Using the button for a table of contents will need a button layout to fit the new needs...
DenisChenu

DenisChenu

2021-09-11 17:17

developer   ~66456

Just include this twig file : https://github.com/LimeSurvey/LimeSurvey/blob/master/themes/survey/vanilla/views/subviews/navigation/question_index_groups_buttons.twig

I ask you to test with javascript because this file was shown without javascript
https://github.com/LimeSurvey/LimeSurvey/blob/1ce953a23c6012b838b1826b41669d41522281ac/themes/survey/vanilla/views/subviews/navigation/navigator_complement.twig#L7
WilliPuhdlich

WilliPuhdlich

2021-09-13 16:55

reporter   ~66473

The identical twig-file is already included in my vanilla template.
DenisChenu

DenisChenu

2021-09-24 14:20

developer   ~66612

Yes : but class hide it.

Else : i disable right click on top menu : no href, no open in new tab ;)
https://gitlab.com/SondagesPro/SurveyThemes/skelvanilla/-/commit/29e0cd92fdc6147ee7bdf4baeb634d280279f038

Issue History

Date Modified Username Field Change
2021-09-09 12:28 Mazi New Issue
2021-09-09 12:28 Mazi File Added: survey_archive_723728.lsa
2021-09-09 12:28 Mazi Issue Monitored: Mazi
2021-09-09 12:28 Mazi Bug heat 0 => 2
2021-09-09 12:30 ollehar Note Added: 66432
2021-09-09 12:30 ollehar Bug heat 2 => 4
2021-09-09 12:38 Mazi Note Added: 66433
2021-09-09 12:38 Mazi Bug heat 4 => 6
2021-09-09 12:51 ollehar Note Added: 66434
2021-09-09 12:55 Mazi Description Updated View Revisions
2021-09-09 12:55 Mazi Steps to Reproduce Updated View Revisions
2021-09-09 12:55 Mazi Note Added: 66435
2021-09-09 12:56 Mazi Note Added: 66436
2021-09-09 12:56 Mazi File Added: image001.jpg
2021-09-09 12:56 Mazi File Added: image002.jpg
2021-09-09 12:56 Mazi File Added: image003.jpg
2021-09-09 12:56 Mazi File Added: image004.jpg
2021-09-09 12:56 Mazi File Added: image005.jpg
2021-09-10 09:56 DenisChenu Note Added: 66442
2021-09-10 09:56 DenisChenu Bug heat 6 => 8
2021-09-10 10:01 galads Assigned To => galads
2021-09-10 10:01 galads Status new => confirmed
2021-09-10 10:20 Mazi Note Added: 66443
2021-09-10 11:33 DenisChenu Note Added: 66444
2021-09-10 12:55 WilliPuhdlich Note Added: 66448
2021-09-10 12:55 WilliPuhdlich Bug heat 8 => 10
2021-09-10 13:43 DenisChenu Note Added: 66449
2021-09-10 14:11 DenisChenu Note Added: 66450
2021-09-10 14:12 galads Bug heat 10 => 16
2021-09-10 17:32 WilliPuhdlich Note Added: 66453
2021-09-10 18:46 DenisChenu Note Added: 66454
2021-09-10 20:09 WilliPuhdlich Note Added: 66455
2021-09-11 17:17 DenisChenu Note Added: 66456
2021-09-13 16:55 WilliPuhdlich Note Added: 66473
2021-09-17 16:20 ollehar Severity crash => partial_block
2021-09-24 14:20 DenisChenu Note Added: 66612