Dependency Graph

Dependency Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

This bug affects 2 person(s).
 20
IDProjectCategoryView StatusLast Update
18186Bug reportsSurvey takingpublic2022-06-27 14:01
Reporterritapas Assigned ToDenisChenu  
PrioritynoneSeverityblock 
Status closedResolutionfixed 
Product Version3.28.x 
Fixed in Version3.28.x 
Summary18186: Language changer does not work in registration page
Description

the language changer button does not work in survey registration page

Steps To Reproduce

Steps to reproduce

create a survey with at least two languages, add a participant table and allow participants to register themselves. Activate survey and head to survey page. Try to change the language.

Expected result

Page language should be changed

Actual result

Language only changes when using Mozilla Firefox. With edge, language is not changed and no error in js console. With Chrome, language is not changed and console reports errors as in image.
Tried with fruity, vanilla and bootswatch theme

TagsNo tags attached.
Bug heat20
Complete LimeSurvey version number (& build)3.28.13 (build 220531)
I will donate to the project if issue is resolvedNo
BrowserChrome Versione 102.0.5005.63 (Build ufficiale) (a 64 bit), Edge Versione 100.0.1185.44 (Build ufficiale) (64 bit)
Database type & versionmariadb 5.5.60
Server OS (if known)Red Hat Enterprise Linux Server release 7.5 (Maipo)
Webserver software & version (if known)httpd-2.4.6-80
PHP Versionrh-php71

Relationships

related to 16024 closedDenisChenu Language changer dropdown autoupdated : keyboard navigation issue 

Activities

ritapas

ritapas

2022-06-09 14:16

reporter  

immagine.png (48,698 bytes)   
immagine.png (48,698 bytes)   
gabrieljenik

gabrieljenik

2022-06-09 18:12

manager   ~70318

I think this could have already been solved by 18128.
Can you please try updating to latest and try again?

Thanks!

ritapas

ritapas

2022-06-17 16:06

reporter   ~70403

Hello, I've tried version 3.28.14 again with Chrome and Edge and the problem is still there even though the javascript error have disappeared, sorry

seccanj

seccanj

2022-06-17 16:42

reporter   ~70404

Hi all,
we tried to update our environment with the latest 3.28.14 tag, but unfortunately the bug is still present.

I performed some debugging and the problem is in the javascript that registers a listener to the "click" event onthe language chooser select box.
This does not work on Chrome.

I implemented a simple fix that seems to work on both Edge and Chrome. It replaces the 'onclick' event on the option element with a 'change' event on the select box itself.

The file is "assets/packages/limesurvey/survey.js" and the diff is the following:

--- survey.js.ORIG 2022-06-17 15:50:06.000000000 +0200
+++ survey.js 2022-06-17 16:36:26.958903081 +0200
@@ -213,7 +213,7 @@
}
});
/ Language changer dropdown /

  • $('.form-change-lang [name="lang"] option:not(selected)').on('click', function(event) {
  • $('.form-change-lang [name="lang"]').on('change', function(event) {
    var closestForm = $(this).closest('form');
    var newLang = $(this).val();
    if (!closestForm.length) {

Please, could you try it and in case apply it to the 3.x branch?

Thanks for your support.
Roberto Longobardi

seccanj

seccanj

2022-06-17 16:45

reporter   ~70405

Ooops... pasting the code did not work well...
Let's try with a screenshot:

image.png (15,018 bytes)   
image.png (15,018 bytes)   
seccanj

seccanj

2022-06-17 18:29

reporter   ~70408

This is the proposed pull request for the 3.x-LTS: https://github.com/LimeSurvey/LimeSurvey/pull/2470

BTW, I just saw that on the master branch a similar fix is already present.

DenisChenu

DenisChenu

2022-06-20 08:36

developer   ~70412

There are another issue about JS solution here : token enable survey : we have the top menu

Not with register.
My opinion :

  1. Must disable all JS in dropdown (like you propose in you fix)
  2. Must fix LS core to add the language changer menu

(I report the issue for master)

gabrieljenik

gabrieljenik

2022-06-21 21:05

manager   ~70462

@seccanj This is your new PR, right?
https://github.com/LimeSurvey/LimeSurvey/pull/2474

seccanj

seccanj

2022-06-22 10:59

reporter   ~70480

Yes Denis.
Thanks.
Roberto

seccanj

seccanj

2022-06-22 11:03

reporter   ~70481

I meant yes @gabrieljenik.
Thanks.
Roberto

DenisChenu

DenisChenu

2022-06-22 11:08

developer   ~70482

I review + test and merge (if it's OK)

guest

guest

2022-06-22 11:29

viewer   ~70483

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

LimeBot

LimeBot

2022-06-27 14:01

administrator   ~70554

Fixed in Release 3.28.17+220627

Related Changesets

LimeSurvey: 3.x-LTS 90cb999b

2022-06-22 11:29:39

seccanj


Committer: GitHub Details Diff
Fixed issue 18186: Language changer does not work in registration page (#2474)

Fixed issue 18186: Language changer does not work in registration page
Dev: same fix than master
Dev: keyboard navigation OK
Dev: submit button OK
Affected Issues
18186
mod - assets/packages/limesurvey/survey.js Diff File

Issue History

Date Modified Username Field Change
2022-06-09 14:16 ritapas New Issue
2022-06-09 14:16 ritapas File Added: immagine.png
2022-06-09 18:12 gabrieljenik Assigned To => gabrieljenik
2022-06-09 18:12 gabrieljenik Status new => feedback
2022-06-09 18:12 gabrieljenik Note Added: 70318
2022-06-09 18:12 gabrieljenik Bug heat 0 => 2
2022-06-17 16:06 ritapas Note Added: 70403
2022-06-17 16:06 ritapas Bug heat 2 => 4
2022-06-17 16:06 ritapas Status feedback => assigned
2022-06-17 16:07 guest Bug heat 4 => 10
2022-06-17 16:42 seccanj Note Added: 70404
2022-06-17 16:42 seccanj Bug heat 10 => 12
2022-06-17 16:45 seccanj Note Added: 70405
2022-06-17 16:45 seccanj File Added: image.png
2022-06-17 18:29 seccanj Note Added: 70408
2022-06-20 08:36 DenisChenu Note Added: 70412
2022-06-20 08:36 DenisChenu File Added: Capture d’écran du 2022-06-20 08-34-10.png
2022-06-20 08:36 DenisChenu File Added: Capture d’écran du 2022-06-20 08-34-54.png
2022-06-20 08:36 DenisChenu File Added: survey_archive_TokenNoRegister.lsa
2022-06-20 08:36 DenisChenu File Added: survey_archive_TokenWithRegister.lsa
2022-06-20 08:36 DenisChenu Bug heat 12 => 14
2022-06-20 08:42 DenisChenu Relationship added related to 16024
2022-06-21 21:05 gabrieljenik Note Added: 70462
2022-06-22 09:02 DenisChenu Assigned To gabrieljenik => DenisChenu
2022-06-22 09:23 DenisChenu Status assigned => in code review
2022-06-22 10:59 seccanj Note Added: 70480
2022-06-22 11:03 seccanj Note Added: 70481
2022-06-22 11:08 DenisChenu Note Added: 70482
2022-06-22 11:27 DenisChenu Status in code review => ready for merge
2022-06-22 11:29 seccanj Changeset attached => LimeSurvey 3.x-LTS 90cb999b
2022-06-22 11:29 guest Note Added: 70483
2022-06-22 11:29 guest Bug heat 14 => 16
2022-06-22 11:32 DenisChenu Status ready for merge => resolved
2022-06-22 11:32 DenisChenu Resolution open => fixed
2022-06-22 11:32 DenisChenu Fixed in Version => 3.28.x
2022-06-22 15:00 ritapas Issue Monitored: ritapas
2022-06-22 15:00 ritapas Bug heat 16 => 18
2022-06-27 14:01 LimeBot Note Added: 70554
2022-06-27 14:01 guest Bug heat 18 => 20
2022-06-27 14:01 LimeBot Bug heat 20 => 18
2022-06-27 14:01 LimeBot Status resolved => closed
2022-06-27 14:01 LimeBot Bug heat 18 => 20