View Issue Details

This bug affects 2 person(s).
 20
IDProjectCategoryView StatusLast Update
17586Bug reportsSurvey takingpublic2022-02-14 11:26
ReporterMazi Assigned Togabrieljenik  
PrioritynoneSeveritypartial_block 
Status closedResolutionfixed 
Product Version3.25.20 
Summary17586: Opening new browser tabs using question index leads to inputted data being deleted
Description

In 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 Reproduce

Try 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.
Attached Files
Bug heat20
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

Mazi

Activities

ollehar

ollehar

2021-09-09 12:30

administrator   ~66432

Old issue or regression?

Mazi

Mazi

2021-09-09 12:38

updater   ~66433

Last edited: 2022-01-17 12:56

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

Last edited: 2022-01-17 12:56

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

Mazi

Mazi

2021-09-09 12:55

updater   ~66435

Last edited: 2022-01-17 12:56

Steps to reproduce added.

Mazi

Mazi

2021-09-09 12:56

updater   ~66436

Last edited: 2022-01-17 12:56

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

Last edited: 2022-01-17 12:56

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

updater   ~66443

Last edited: 2022-01-17 12:56

@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

Last edited: 2022-01-17 12:56

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

Last edited: 2022-01-17 12:56

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

Last edited: 2022-01-17 12:56

No : use button if you want.

A link didn't submit data.

DenisChenu

DenisChenu

2021-09-10 14:11

developer   ~66450

Last edited: 2022-01-17 12:56

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

Last edited: 2022-01-17 12:56

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

Last edited: 2022-01-17 12:56

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

Last edited: 2022-01-17 12:56

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

Last edited: 2022-01-17 12:56

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

Last edited: 2022-01-17 12:56

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

DenisChenu

DenisChenu

2021-09-24 14:20

developer   ~66612

Last edited: 2022-01-17 12:56

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

Mazi

Mazi

2022-01-14 14:15

updater   ~68011

Last edited: 2022-01-17 12:56

@galads, any ideas how you want to deal with this issue? It does not happen very often I assume but since the result is a data loss, I consider this rather urgent.

DenisChenu

DenisChenu

2022-01-14 15:04

developer   ~68020

Last edited: 2022-01-17 12:56

Fixed in SkelVanilla ;)

But better to fix it with button (need more css update)

Mazi

Mazi

2022-01-14 15:09

updater   ~68024

Last edited: 2022-01-17 12:56

@DeniChenu, unfortunetaly, not everyone is using SkellVanilla. Could your patch be applied to the core parent LS themes?

gabrieljenik

gabrieljenik

2022-01-31 15:31

manager   ~68152

https://github.com/LimeSurvey/LimeSurvey/pull/2224

Agree with Denis that the solution is basically to prevent the index menu links from being opened in another tab.

What Denis proposes is to turn it into a button.
The problem is that if we turn it into a button we get into a mess with the CSS, and we can break the themes.

So, we removed the href and add tabindex=0 (because anchors without href are not included by default in the tabbing).

Don't know if it will be necessary to also add role="button".
Not greatly familiar with screen reader topic.

DenisChenu

DenisChenu

2022-02-01 11:09

developer   ~68160

For a cleaner solution : need button tag and not a…

You copy my patch : why delete role="button" ?

DenisChenu

DenisChenu

2022-02-01 11:11

developer   ~68161

Don't know if it will be necessary to also add role="button".
Not greatly familiar with screen reader topic.

… role are not made only for a11y , but a11y use it.

https://www.w3.org/WAI/PF/HTML/wiki/RoleAttribute
https://www.freecodecamp.org/news/html-role-attribute/

gabrieljenik

gabrieljenik

2022-02-01 21:49

manager   ~68179

You copy my patch : why delete role="button" ?

We didn't copy it, but seems to be very similar :)
Will add the role as you mention

gabrieljenik

gabrieljenik

2022-02-07 12:44

manager   ~68223

Fix committed to 3.x-LTS branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=33148

LimeBot

LimeBot

2022-02-14 11:26

administrator   ~68292

Fixed in Release 3.28.0+220215

Related Changesets

LimeSurvey: 3.x-LTS 29a315fd

2022-02-07 12:25:44

gabrieljenik


Committer: GitHub Details Diff
Fixed issue 17586: Opening new browser tabs using question index lea… (#2224)

* Fixed issue 17586: Opening new browser tabs using question index leads to inputted data being deleted

- Remove href from menu links to avoid opening on new page

* Fixed issue 17586: Opening new browser tabs using question index leads to inputted data being deleted

- Add 'role' attribute

Co-authored-by: encuestabizdevgit <devgit@encuesta.biz>
Affected Issues
17586
mod - themes/survey/vanilla/views/subviews/navigation/question_index_menu.twig Diff File

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
2021-09-09 12:55 Mazi Steps to Reproduce Updated
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
2022-01-14 14:15 Mazi Note Added: 68011
2022-01-14 15:04 DenisChenu Note Added: 68020
2022-01-14 15:09 Mazi Note Added: 68024
2022-01-17 12:56 galads Zoho Project Synchronization => |Yes|
2022-01-31 15:31 gabrieljenik Note Added: 68152
2022-01-31 15:31 gabrieljenik Bug heat 16 => 18
2022-02-01 11:09 DenisChenu Note Added: 68160
2022-02-01 11:11 DenisChenu Note Added: 68161
2022-02-01 21:49 gabrieljenik Note Added: 68179
2022-02-07 12:44 gabrieljenik Changeset attached => LimeSurvey 3.x-LTS 29a315fd
2022-02-07 12:44 gabrieljenik Note Added: 68223
2022-02-07 12:44 gabrieljenik Assigned To galads => gabrieljenik
2022-02-07 12:44 gabrieljenik Resolution open => fixed
2022-02-14 11:26 LimeBot Zoho Project Synchronization Yes => |Yes|
2022-02-14 11:26 LimeBot Note Added: 68292
2022-02-14 11:26 LimeBot Status confirmed => closed
2022-02-14 11:26 LimeBot Bug heat 18 => 20