View Issue Details

IDProjectCategoryView StatusLast Update
13298Bug reports[All Projects] _ Unknownpublic2018-02-15 11:27
ReportermarakkA Assigned Toollehar  
PrioritynoneSeveritymajor 
Status feedbackResolutionopen 
Product Version3.1.x 
Target VersionFixed in Version 
Summary13298: Retrieiving datetimesettings breaks JS functions in v3.1
Description

After updating to v3, when you attempt to use the numbered pagination controls at the bottom of the survey participants list you get an exception in the console:

First you notice that the following resource does not load:

GET http://www.domain.com/index.php/admin/survey/sa/datetimesettings?YII_CSRF_TOKEN=xyz 404 (Not Found)

which leads to:

Uncaught TypeError: Cannot read property 'jsdate' of undefined

which results in javascript controls not working e.g. Unable to send invites to selected participants

Steps To Reproduce

Load survey participants screen with more records than max per page so pagination controls are displayed. Click on the 2nd page and then view browser console. Any functions which require JS will fail e.g. attempt to select a record and choose to invite, the new tab will not open.

TagsNo tags attached.
Complete LimeSurvey version number (& build)Version 3.1.1+180130
I will donate to the project if issue is resolvedYes
Browser
Database & DB-Version5.5.56-MariaDB MariaDB Server
Server OS (if known)CentOS Linux release 7.4.1708 (Core)
Webserver software & version (if known)Apache HTTP server 2.4.6
PHP Version5.6.33

Activities

ollehar

ollehar

2018-02-06 12:19

administrator   ~46275

I can confirm that the errors are visible in the JS console, but as far as I can see, they don't block any functionality. How did you try to send out email, which button exactly?

marakkA

marakkA

2018-02-06 12:22

reporter   ~46276

If you select some participants and then click on the dropdown in the bottom left and select "Send email invitations" then instead of loading a new tab/window to complete the next step it just returns the viewport to the top of the page. So we are unable to send invites to participants beyond the maximum displayed per page as the control is broken when clicking on the second page.

ollehar

ollehar

2018-02-08 11:28

administrator   ~46305

Cannot reproduce. Can you please:

  1. Update to latest version of LS.
  2. Test different browsers. Tell my which.
  3. Please give me a screenshot of the browser console/window before and after the error.
marakkA

marakkA

2018-02-08 14:08

reporter   ~46320

  1. Done. Running 3.2.0+180206
  2. Chrome 64.0.3282.140 on MacOS, Safari 11.03 on MacOS, Firefox 58.02 on MacOS
  3. Console screenshots for each of the browsers above attached


safari.png (158,585 bytes)
firefox.png (244,863 bytes)
chrome.png (125,160 bytes)
ollehar

ollehar

2018-02-08 15:30

administrator   ~46323

OK, at least parts of this issue (JS error) has been fixed in latest release. Can you update to 3.2.1, please?

marakkA

marakkA

2018-02-09 12:33

reporter   ~46349

With 3.2.1 there is no longer an issue loading the 'datetimesettings' url but now there is a 403 as it tries to load the url below but is denied by the .htaccess file in ./application/.htaccess. The result is the same, unable to send email invitations. I am able to temporarily resolve the problem by editing the .htaccess file to allow this path. Attached is console screenshot.

https://www.abc.com/survey/application/extensions/admin/grid/MassiveActionsWidget/assets/listActions.js

ollehar

ollehar

2018-02-14 16:56

administrator   ~46467

The solution to this is to move listActions.js to assets/ folder.

ollehar

ollehar

2018-02-14 17:10

administrator   ~46472

@LouisGac, can you write down a recommendation on how to split the widget?

LouisGac

LouisGac

2018-02-15 10:42

manager   ~46502

olle: we should just edit the .htaccess that block the access to application's subfolders

ollehar

ollehar

2018-02-15 10:51

administrator   ~46504

@marakkA Can you test the solution proposed here, please? https://stackoverflow.com/a/7650159/2138090

Basically, put

Order allow,deny
Allow from all

in .htaccess in subfolder https://www.abc.com/survey/application/extensions/admin/grid/MassiveActionsWidget/assets

Issue History

Date Modified Username Field Change
2018-02-06 00:00 marakkA New Issue
2018-02-06 12:19 ollehar Assigned To => ollehar
2018-02-06 12:19 ollehar Status new => feedback
2018-02-06 12:19 ollehar Note Added: 46275
2018-02-06 12:22 marakkA Note Added: 46276
2018-02-06 12:22 marakkA Status feedback => assigned
2018-02-08 11:28 ollehar Status assigned => feedback
2018-02-08 11:28 ollehar Note Added: 46305
2018-02-08 14:08 marakkA File Added: safari.png
2018-02-08 14:08 marakkA File Added: firefox.png
2018-02-08 14:08 marakkA File Added: chrome.png
2018-02-08 14:08 marakkA Note Added: 46320
2018-02-08 14:08 marakkA Status feedback => assigned
2018-02-08 15:30 ollehar Note Added: 46323
2018-02-08 15:30 ollehar Status assigned => feedback
2018-02-09 12:33 marakkA Note Added: 46349
2018-02-09 12:33 marakkA Status feedback => assigned
2018-02-14 16:56 ollehar Note Added: 46467
2018-02-14 17:10 ollehar Note Added: 46472
2018-02-15 10:42 LouisGac Note Added: 46502
2018-02-15 10:51 ollehar Note Added: 46504
2018-02-15 11:27 ollehar Status assigned => feedback