View Issue Details

This bug affects 1 person(s).
 14
IDProjectCategoryView StatusLast Update
16501Bug reportsSurvey takingpublic2020-11-01 10:41
ReporterTomBenj Assigned Toadamzammit  
PriorityhighSeverityblock 
Status closedResolutionfixed 
Product Version4.3.3 
Summary16501: Navigation Problems on iPhone and Mac
Description

The ”Next” button is not working in the survey, keeps saying participant used browser buttons and will not continue. The error only appears to occur on iPhone, iPad or Mac devices.

Steps To Reproduce

I don't have access to an iPad/iPhone to reproduce this, but it appears to be exactly the same bug I reported two months ago 16121 - https://bugs.limesurvey.org/view.php?id=16121 - though that was with an earlier build of LimeSurvey.
This is extremely frustrating, and makes us look bad as an organization. We're sending surveys to 1000+ participants and those with iPhone, iPad or Mac devices can't get past the first few questions.
I will gladly invite someone from the LimeSurvey community to this survey so they can identify and fix the error

Tagsbug
Attached Files
Bug heat14
Complete LimeSurvey version number (& build)Version 4.3.3+200707
I will donate to the project if issue is resolvedYes
BrowserSafari 13 (assumed)
Database type & versionMySQL 10.3.23-MariaDB-cll-lve
Server OS (if known)Linux
Webserver software & version (if known)Apache 2.4.43
PHP Version7.4.8

Relationships

related to 16803 closedcdorin Participants have to press 'Next' button multiple times to begin survey - first page keeps reloading 

Users monitoring this issue

Sindre

Activities

TomBenj

TomBenj

2020-07-21 23:56

reporter   ~59029

I believe I was wrong about the PHP version, it's 7.4, and I've attached a screenshot of the activated and available extensions. I posted this same issue on the LimeSurvey Forums and a partner there suggested this was an environment issue. Can anyone help me with this?

TomBenj

TomBenj

2020-07-22 01:23

reporter   ~59033

I've created a phpinfo() file here - https://cupe1978.com/survey/info.php - confirming PHP 7.4.8 and providing information about the environment.

adamzammit

adamzammit

2020-09-28 01:04

developer   ~59967

as for bug 16121 I can confirm that this bug doesn't show on PHP 7.3, but on the same installation of LimeSurvey will occur for PHP 7.4.

For now downgrading will fix this (7.3 is still stable and supported) - but will need to be resolved

cdorin

cdorin

2020-10-13 17:33

reporter   ~60181

@adamzammit and @TomBenj , thanks for reporting it. Does it occur on LS3 as well? Or is it only LS4 with php 7.4?

adamzammit

adamzammit

2020-10-14 00:53

developer   ~60184

Hi @cdorin - Yes it does occur on LS3 too.

Adam

cdorin

cdorin

2020-10-14 11:07

reporter   ~60197

Ok, assigned it to @gabrieljenik and increased its priority since more and more users will move to php7.4

gabrieljenik

gabrieljenik

2020-10-21 21:36

manager   ~60349

I don't think this is related to PHP version.
Seems to be something very related to browser.

Maybe it is because the using the autocomplete on safari maybe doesnt trigger the change event?

One thing we could try is to add a small snippet in the survey as to don't allow autocomplete.
If errors can't be reproduced then, we will then know better where to look and how to solve it.

gabrieljenik

gabrieljenik

2020-10-22 16:47

manager   ~60367

This is very hard to reproduce. Can you please tell me a specific browser version to test with?
Also, this happens only when using the autofill, right?
If user types in, no error appears, right?

I can suggest the following: On the test survey created, we intrduce a snippet that can record screen, JS errors and others as browser versions. That will give us a little bit more of information.

adamzammit

adamzammit

2020-10-23 07:07

developer   ~60381

It seems to be on any Safari based browser.

From my testing so far, it appears that Safari is reloading the page for the first few requests, which is then resetting the LEMpostKey variable in the session to a new random value. This is causing the alert to occur. It is only occurring on PHP 7.4 not on PHP 7.3.

I did a HTML diff of the code produced by the PHP 7.4 version and the PHP 7.3 version and the only difference (besides the obvious cookie / session variables) was that the favicon href was missing in the PHP 7.4 version.

When I hacked the imageSrc function in core/LS_Twig_Extension.php to always give a valid image URL, Safari didn't request the main page twice and the bug disappeared.

So then I looked at the ValidateImage function in core/LSYii_ImageValidator.php

and the built in favicon.ico in the template was returning an error in validation:

53 (
54 [debug] => image/vnd.microsoft.icon
55 [uploadresult] => This file is not a supported image - please only upload JPG,PNG,GIF or SVG type images.
56 [check] =>
57 )

So adding "image/vnd.microsoft.icon" to that file did the trick. This gave a valid path to the :

<link rel="shortcut icon" href="/tmp/assets/e02d29a2/favicon.ico" />

instead of :

<link rel="shortcut icon" href="" />

Which stopped Safari from reloading the page, which avoided LEMpostKey being reset and the error showing.

adamzammit

adamzammit

2020-10-23 07:10

developer   ~60382

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

adamzammit

adamzammit

2020-10-23 07:14

developer   ~60383

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=30654

DenisChenu

DenisChenu

2020-10-23 08:40

developer   ~60384

@adamzammit : thanks for this grat fix.

Else, seems there are an issue in theme too
<link rel="shortcut icon" href="" /> is invalid we must add a checker before , no ?.

{% if(imageSrc('./files/favicon.ico')) %}
    <link rel="shortcut icon" href="{{ imageSrc('./files/favicon.ico') }}" />
{% endif %}

Else : it due to the 404 error in fact …

Which stopped Safari from reloading the page, which avoided LEMpostKey being reset and the error showing.

Did a simple broken image do the same ? <img src="">

gabrieljenik

gabrieljenik

2020-10-23 15:28

manager   ~60391

Now that you mention it, it happened to me in onther platforms that a 404 ended in a redirect to the index and made the session to reset. Nice finding.

Still, if that's the case, why it only applies to text questions and not to others?
Where does the autofill fit in here?

gabrieljenik

gabrieljenik

2020-10-23 15:51

manager   ~60392

Did a simple broken image do the same ? &lt;img src=&quot;&quot;>
@DenisChenu: I don't think that's a simple broken image, is a broken image that is pointing to the same page. Very specific.
So, yes, a broken image like that, may lead to the same behaviour. Still, not very usual broken image type :)

Yet, I have some loose tails on the whole thing.

Will wait to Addam's reply.

DenisChenu

DenisChenu

2020-10-23 15:53

developer   ~60393

@gabrieljenik : src='' => broken image to the current url :) then can be example.org/1234 for example

Since imageSrc return false if empty : < img src='imageSrc('./files/mybeautifullandinvalidlogo.jpg')' > can (maybe) do the same issue :)

adamzammit

adamzammit

2020-10-25 22:33

developer   ~60397

@DenisChenu - I agree there should be a checker in the theme as you suggested as imageSrc can return false - do you want to add that in?

I have not checked the behaviour for just a broken image - but I think if imageSrc is called, and can return false, then something should happen to the img tag - either it should be removed as you have suggested for the link tag, or a placeholder should be put in so invalid HTML is not produced.

@gabrieljenik I observed the behaviour on all types of questions not just text questions. I didn't see the connection with "autofill"

DenisChenu

DenisChenu

2020-10-26 07:35

developer   ~60400

I have not checked the behaviour for just a broken image - but I think if imageSrc is called, and can return false, then something should happen to the img tag - either it should be removed as you have suggested for the link tag, or a placeholder should be put in so invalid HTML is not produced.

There are a image function than do the image , theme editor can use it :).

I report and fix the other issue with invalid ico file

lime_release_bot

lime_release_bot

2020-10-26 08:16

administrator   ~60404

Fixed in Release 4.3.23+201026

Related Changesets

LimeSurvey: 3.x-LTS 926bfe95

2020-10-23 09:09

adamzammit


Details Diff
Fixed issue 16501: Navigation Problems on iPhone and Mac Affected Issues
16501
mod - application/core/LSYii_ImageValidator.php Diff File

LimeSurvey: master d3856822

2020-10-23 09:14

adamzammit


Details Diff
Fixed issue 16501: Navigation Problems on iPhone and Mac Affected Issues
16501
mod - application/core/LSYii_ImageValidator.php Diff File

LimeSurvey: master a2152626

2020-10-26 09:29

DenisChenu


Details Diff
Dev: follow 16501: Navigation Problems on iPhone and Mac
Dev: check if ./files/favicon.ico is OK before use it
Affected Issues
16501
mod - themes/survey/vanilla/views/subviews/header/head.twig Diff File

Issue History

Date Modified Username Field Change
2020-07-16 20:22 TomBenj New Issue
2020-07-16 20:22 TomBenj File Added: limesurvey_survey_624697.lss
2020-07-16 20:24 TomBenj Tag Attached: bug
2020-07-21 23:56 TomBenj Note Added: 59029
2020-07-21 23:56 TomBenj File Added: php 2020-07-21_14-28-30.png
2020-07-22 01:23 TomBenj Note Added: 59033
2020-08-04 18:19 Sindre Issue Monitored: Sindre
2020-09-28 01:04 adamzammit Status new => confirmed
2020-09-28 01:04 adamzammit PHP Version 5.6.40 => 7.4.8
2020-09-28 01:04 adamzammit Note Added: 59967
2020-10-13 17:32 cdorin Assigned To => gabrieljenik
2020-10-13 17:32 cdorin Status confirmed => assigned
2020-10-13 17:33 cdorin Note Added: 60181
2020-10-13 17:33 cdorin Priority none => high
2020-10-14 00:53 adamzammit Note Added: 60184
2020-10-14 11:07 cdorin Note Added: 60197
2020-10-21 21:36 gabrieljenik Note Added: 60349
2020-10-22 16:47 gabrieljenik Note Added: 60367
2020-10-23 07:07 adamzammit Note Added: 60381
2020-10-23 07:08 adamzammit Assigned To gabrieljenik => adamzammit
2020-10-23 07:10 adamzammit Changeset attached => LimeSurvey 3.x-LTS 926bfe95
2020-10-23 07:10 adamzammit Note Added: 60382
2020-10-23 07:10 adamzammit Resolution open => fixed
2020-10-23 07:14 adamzammit Changeset attached => LimeSurvey master d3856822
2020-10-23 07:14 adamzammit Note Added: 60383
2020-10-23 08:40 DenisChenu Note Added: 60384
2020-10-23 15:28 gabrieljenik Note Added: 60391
2020-10-23 15:51 gabrieljenik Note Added: 60392
2020-10-23 15:53 DenisChenu Note Added: 60393
2020-10-25 22:33 adamzammit Note Added: 60397
2020-10-26 07:35 DenisChenu Note Added: 60400
2020-10-26 08:16 lime_release_bot Note Added: 60404
2020-10-26 08:16 lime_release_bot Status assigned => closed
2020-10-26 09:20 DenisChenu Changeset attached => LimeSurvey master a2152626
2020-11-01 10:40 DenisChenu Relationship added has duplicate 16803
2020-11-01 10:41 DenisChenu Relationship deleted has duplicate 16803
2020-11-01 10:41 DenisChenu Relationship added related to 16803
2021-08-02 18:23 guest Bug heat 12 => 14