View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
17135Bug reportsStatisticspublic2022-08-08 09:17
Reporterjcieszlak Assigned Togabrieljenik  
PrioritynoneSeveritypartial_block 
Status closedResolutionfixed 
Product Version4.4.7 
Summary17135: activating Public statistics option causes json to display
Description

When you click save after activating public statistics and show graphs in public statistics json is displayed instead of the editor page.

Steps To Reproduce
  1. create new survey
  2. create 1 question group and 1 question (needed to activate survey)
  3. click "Activate survey" from overview tab, click "Save & activate survey"
  4. click "Statistics" settings tab on the left
  5. click "Presentation" settings tab on the left
  6. turn on "Public statistics" and "Show graphs in public statistics"
  7. click "Save" on the top right
  8. Error appears
{"success":true,"updated":["publicgraphs","navigationdelay","printanswers","publicstatistics","autoredirect","showxquestions","showgroupinfo","showqnumcode","shownoanswer","showwelcome","allowprev","questionindex","nokeyboard","showprogress"],"DEBUG":{"POST":{"YII_CSRF_TOKEN":"b1FhOWVqZWlHMEhtUk5uVmpUU1JUZVRYQnJCR2RGcTkpXf0Cr8vGB4NsIW6vmbbR1OTyQZ4EEv8iFB-nHTEw5Q==","navigationdelay":"-1","navigationdelaybutton":"N","questionindex":"-1","showgroupinfo":"I","showqnumcode":"I","shownoanswer":"I","showxquestions":"I","showwelcome":"I","allowprev":"I","nokeyboard":"I","showprogress":"I","printanswers":"I","publicstatistics":"N","publicgraphs":"Y","autoredirect":"I","action":"updatesurveylocalesettings","sid":"853442","surveyid":"853442","language":"en","responsejson":"1"},"reloaded":{"sid":853442,"owner_id":2,"gsid":1,"admin":"testadmin@zf.com","active":"Y","expires":"2021-02-25 16:11:45","startdate":null,"adminemail":"testemail@zf.com","anonymized":"N","faxto":"","format":"I","savetimings":"N","template":"inherit","language":"en","additional_languages":"","datestamp":"N","usecookie":"I","allowregister":"I","allowsave":"I","autonumber_start":1,"autoredirect":"I","allowprev":"I","printanswers":"I","ipaddr":"N","ipanonymize":"N","refurl":"N","datecreated":"2021-01-28 00:00:00","publicstatistics":"N","publicgraphs":"Y","listpublic":"I","htmlemail":"I","sendconfirmation":"I","tokenanswerspersistence":"I","assessments":"I","usecaptcha":"E","usetokens":"N","bounce_email":"testbounce@zf.com","attributedescriptions":null,"emailresponseto":"inherit","emailnotificationto":"inherit","tokenlength":-1,"showxquestions":"I","showgroupinfo":"I","shownoanswer":"I","showqnumcode":"I","bouncetime":null,"bounceprocessing":"N","bounceaccounttype":null,"bounceaccounthost":null,"bounceaccountpass":null,"bounceaccountencryption":null,"bounceaccountuser":null,"showwelcome":"I","showprogress":"I","questionindex":-1,"navigationdelay":-1,"nokeyboard":"I","alloweditaftercompletion":"I","googleanalyticsstyle":"","googleanalyticsapikey":"","tokenencryptionoptions":"{ \"enabled\":\"Y\",\"columns\":{ \"firstname\":\"N\",\"lastname\":\"N\",\"email\":\"N\" } }","showsurveypolicynotice":0},"aURLParams":"","initial":{"htmlemail":"I","format":"I","tokenencryptionoptions":"{ \"enabled\":\"Y\",\"columns\":{ \"firstname\":\"N\",\"lastname\":\"N\",\"email\":\"N\" } }","template":"inherit","language":"en","owner_id":2,"admin":"testadmin@zf.com","adminemail":"testemail@zf.com","sid":853442,"gsid":1,"active":"Y","expires":"2021-02-25 16:11:45","startdate":null,"anonymized":"N","faxto":"","savetimings":"N","additional_languages":"","datestamp":"N","usecookie":"I","allowregister":"I","allowsave":"I","autonumber_start":1,"autoredirect":"I","allowprev":"I","printanswers":"I","ipaddr":"N","ipanonymize":"N","refurl":"N","datecreated":"2021-01-28 00:00:00","publicstatistics":"Y","publicgraphs":"Y","listpublic":"I","sendconfirmation":"I","tokenanswerspersistence":"I","assessments":"I","usecaptcha":"E","usetokens":"N","bounce_email":"testbounce@zf.com","attributedescriptions":null,"emailresponseto":"inherit","emailnotificationto":"inherit","tokenlength":-1,"showxquestions":"I","showgroupinfo":"I","shownoanswer":"I","showqnumcode":"I","bouncetime":null,"bounceprocessing":"N","bounceaccounttype":null,"bounceaccounthost":null,"bounceaccountpass":null,"bounceaccountencryption":null,"bounceaccountuser":null,"showwelcome":"I","showprogress":"I","questionindex":-1,"navigationdelay":-1,"nokeyboard":"I","alloweditaftercompletion":"I","googleanalyticsstyle":"","googleanalyticsapikey":"","showsurveypolicynotice":0},"afterApply":{"htmlemail":"I","format":"I","tokenencryptionoptions":"{ \"enabled\":\"Y\",\"columns\":{ \"firstname\":\"N\",\"lastname\":\"N\",\"email\":\"N\" } }","template":"inherit","language":"en","owner_id":2,"admin":"testadmin@zf.com","adminemail":"testemail@zf.com","sid":853442,"gsid":1,"active":"Y","expires":"2021-02-25 16:11:45","startdate":null,"anonymized":"N","faxto":"","savetimings":"N","additional_languages":"","datestamp":"N","usecookie":"I","allowregister":"I","allowsave":"I","autonumber_start":1,"autoredirect":"I","allowprev":"I","printanswers":"I","ipaddr":"N","ipanonymize":"N","refurl":"N","datecreated":"2021-01-28 00:00:00","publicstatistics":"N","publicgraphs":"Y","listpublic":"I","sendconfirmation":"I","tokenanswerspersistence":"I","assessments":"I","usecaptcha":"E","usetokens":"N","bounce_email":"testbounce@zf.com","attributedescriptions":null,"emailresponseto":"inherit","emailnotificationto":"inherit","tokenlength":-1,"showxquestions":"I","showgroupinfo":"I","shownoanswer":"I","showqnumcode":"I","bouncetime":null,"bounceprocessing":"N","bounceaccounttype":null,"bounceaccounthost":null,"bounceaccountpass":null,"bounceaccountencryption":null,"bounceaccountuser":null,"showwelcome":"I","showprogress":"I","questionindex":-1,"navigationdelay":-1,"nokeyboard":"I","alloweditaftercompletion":"I","googleanalyticsstyle":"","googleanalyticsapikey":"","showsurveypolicynotice":"0"}}}
Additional Information
  1. from an activated survey, refresh your webpage (does not matter where)
  2. click "Statistics" settings tab on the left
  3. note the places where on/off switches are placed
  4. click to a different menu/setting on the left
  5. click "Statistics" settings tab on the left
  6. note that these switches are replaced with checkboxes (until page is refreshed)
TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)4.4.7 build 210217
I will donate to the project if issue is resolvedNo
Browser
Database type & versionPostgresql 9
Server OS (if known)
Webserver software & version (if known)
PHP Version7.4.14

Users monitoring this issue

User List There are no users monitoring this issue.

Activities

gabrieljenik

gabrieljenik

2022-07-25 17:02

manager   ~71124

The problem was that when the statistics page is loaded by PJAX the Chart.min.js file is not loaded. Then, when you go to the rendersidemenylink pages (also by PJAX), you click a code in statistics.js that depends on Chart, so the code that handles the form submission by AJAX does not get executed.

PR: https://github.com/LimeSurvey/LimeSurvey/pull/2545

gabrieljenik

gabrieljenik

2022-08-02 10:14

manager   ~71288

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

LimeBot

LimeBot

2022-08-08 09:17

administrator   ~71372

Fixed in Release 5.3.30+220808

Related Changesets

LimeSurvey: master b78af1d6

2022-08-02 10:14:04

gabrieljenik


Committer: GitHub Details Diff
Fixed issue 17135: activating Public statistics option causes json to display (#2545)

Co-authored-by: encuestabizdevgit <devgit@encuesta.biz>
Affected Issues
17135
mod - application/views/admin/export/statistics_subviews/_statistics_view_scripts.php Diff File

Issue History

Date Modified Username Field Change
2021-02-25 17:38 jcieszlak New Issue
2021-05-17 11:06 p_teichmann Status new => confirmed
2022-07-21 15:03 gabrieljenik Severity minor => partial_block
2022-07-21 15:03 gabrieljenik Steps to Reproduce Updated
2022-07-25 17:02 gabrieljenik Assigned To => DenisChenu
2022-07-25 17:02 gabrieljenik Status confirmed => ready for code review
2022-07-25 17:02 gabrieljenik Note Added: 71124
2022-07-25 17:02 gabrieljenik Bug heat 0 => 2
2022-07-25 18:51 DenisChenu Assigned To DenisChenu =>
2022-07-25 18:51 DenisChenu Status ready for code review => ready for testing
2022-07-27 23:21 gabrieljenik Assigned To => gabrieljenik
2022-07-27 23:21 gabrieljenik Status ready for testing => ready for merge
2022-08-02 10:14 gabrieljenik Changeset attached => LimeSurvey master b78af1d6
2022-08-02 10:14 gabrieljenik Note Added: 71288
2022-08-02 10:14 gabrieljenik Resolution open => fixed
2022-08-03 13:02 ollehar Status ready for merge => resolved
2022-08-08 09:17 LimeBot Note Added: 71372
2022-08-08 09:17 LimeBot Status resolved => closed
2022-08-08 09:17 LimeBot Bug heat 2 => 4