Thanks to Alex Mountjoy for providing an update to v. 2.1.4 that complies with newer php installations.
I must admit that I was on 2.1.2, so I don’t know if my problems with the latest version is related to new functionality included already in 2.1.3 or 2.1.4.
To boil down my problem I have reproduced this on a fresh plain-vanilla 2.1.4_master installation – only modified the phpESP.ini.php with appropriate values. I have deleted all database tables from the earlier version, and started from a fresh database intitiated by phpESP itself.
I have made a simple TEST-survey with two identically formatted sections separated by a section break. Each of the two sections have three questions. First there are two radio button MUST questions each with five options, and then there is one open text field for comments.
I do not use credit or feedback.
When I enter the survey, it displays correctly and I can fill in the first page. When I press “next page”, I am shown the second page. If I have filled in the open text response I will see on the top of page two the notices:
Notice: Undefined offset: 3 in /var/www/vhosts/fbumonacom/www/phpESP/public/handler.php on line 386
Notice: Undefined offset: 4 in /var/www/vhosts/fbumonacom/www/phpESP/public/handler.php on line 386
Using phpmyadmin I can verify that phpESP actually updates the response_single table correctly with the answers I gave on page one.
I can then fill in page two with replies.
Now if I go back pressing “previous page” I am shown the first page again but the radio button content I gave is NOT displayed, i.e. the two questions appear to be unanswered. The open text response is OK though.
If I retype the answers to the radio button questions and press “Next page” the same Notices as above will appear, and again the radio button questions are seemingly unanswered although I did fill them in earlier.
If I complete page 2 without going back to page 1 but rather “Save Survey” I can verify that the given replies are actually in the database (response_single). (I will receive the Notices mentioned above on top of my thank-you-page, if I have given an open text answer on page two. If I have not given an open text answer on a given page the notices will not be given).
I have struggled with this for quite some time, and I sense that the problem is related to credit and feedback columns, and I have found a very crude work-around which returns normal behavior in my example.
line 505 in espresponse.inc:
FROM: $sql = "SELECT q.id $col,c.content,c.id,c.feedback,c.credit
TO: $sql = "SELECT q.id $col,c.content,c.id
i.e. delete the SELECT of columns c.feedback and c.credit
This will make the radio button response appear correctly as you browse forward/backward between sections.
In turn you will get a lot of notices which must be suppressed by setting the error-level:
Notice: Undefined offset: -1 in /var/www/vhosts/fbumonacom/www/phpESP/admin/include/lib/espresponse.inc on line 514
Notice: Undefined offset: -1 in /var/www/vhosts/fbumonacom/www/phpESP/admin/include/lib/espresponse.inc on line 514
Notice: Undefined offset: 3 in /var/www/vhosts/fbumonacom/www/phpESP/public/handler.php on line 386
Notice: Undefined offset: 4 in /var/www/vhosts/fbumonacom/www/phpESP/public/handler.php on line 386
Notice: Undefined offset: 3 in /var/www/vhosts/fbumonacom/www/phpESP/public/handler.php on line 386
Notice: Undefined offset: 4 in /var/www/vhosts/fbumonacom/www/phpESP/public/handler.php on line 386
Notice: Undefined offset: 3 in /var/www/vhosts/fbumonacom/www/phpESP/public/handler.php on line 386
Notice: Undefined offset: 4 in /var/www/vhosts/fbumonacom/www/phpESP/public/handler.php on line 386
Any thoughts on this would really be appreciated.
Thanks
Søren Voigt
Please try the version on github:
https://github.com/liedekef/phpESP
and create bugreports there.
I downloaded from github this morning in order to make sure that I was updated on everything with latest patches etc. The file downloads as phpESP-master.zip – this is the version I have deployed on a fresh instance with new configuration and a clean database. The only survey in the database is the TEST I have mentioned.
Sorry about the github/SF confusion - I will create an account on github and leave the report there.
/Søren
Fra: Franky Van Liedekerke [mailto:liedekef@users.sf.net]
Sendt: 21. oktober 2014 16:39
Til: [phpesp:bugs] ; [phpesp:bugs]
Emne: [phpesp:bugs] #232 Response to radio button lost on section fwd/back with 2.1.4.Alex
Please try the version on github:
https://github.com/liedekef/phpESP
and create bugreports there.
[bugs:#232] http://sourceforge.net/p/phpesp/bugs/232 Response to radio button lost on section fwd/back with 2.1.4.Alex
Status: open
Group: v2.1.4
Created: Tue Oct 21, 2014 12:29 PM UTC by s_voigt
Last Updated: Tue Oct 21, 2014 12:29 PM UTC
Owner: nobody
Thanks to Alex Mountjoy for providing an update to v. 2.1.4 that complies with newer php installations.
I must admit that I was on 2.1.2, so I don’t know if my problems with the latest version is related to new functionality included already in 2.1.3 or 2.1.4.
To boil down my problem I have reproduced this on a fresh plain-vanilla 2.1.4_master installation – only modified the phpESP.ini.php with appropriate values. I have deleted all database tables from the earlier version, and started from a fresh database intitiated by phpESP itself.
I have made a simple TEST-survey with two identically formatted sections separated by a section break. Each of the two sections have three questions. First there are two radio button MUST questions each with five options, and then there is one open text field for comments.
I do not use credit or feedback.
When I enter the survey, it displays correctly and I can fill in the first page. When I press “next page”, I am shown the second page. If I have filled in the open text response I will see on the top of page two the notices:
Notice: Undefined offset: 3 in /var/www/vhosts/fbumonacom/www/phpESP/public/handler.php on line 386
Notice: Undefined offset: 4 in /var/www/vhosts/fbumonacom/www/phpESP/public/handler.php on line 386
Using phpmyadmin I can verify that phpESP actually updates the response_single table correctly with the answers I gave on page one.
I can then fill in page two with replies.
Now if I go back pressing “previous page” I am shown the first page again but the radio button content I gave is NOT displayed, i.e. the two questions appear to be unanswered. The open text response is OK though.
If I retype the answers to the radio button questions and press “Next page” the same Notices as above will appear, and again the radio button questions are seemingly unanswered although I did fill them in earlier.
If I complete page 2 without going back to page 1 but rather “Save Survey” I can verify that the given replies are actually in the database (response_single). (I will receive the Notices mentioned above on top of my thank-you-page, if I have given an open text answer on page two. If I have not given an open text answer on a given page the notices will not be given).
I have struggled with this for quite some time, and I sense that the problem is related to credit and feedback columns, and I have found a very crude work-around which returns normal behavior in my example.
line 505 in espresponse.inc:
FROM: $sql = "SELECT q.id $col,c.content,c.id,c.feedback,c.credit
TO: $sql = "SELECT q.id $col,c.content,c.id
i.e. delete the SELECT of columns c.feedback and c.credit
This will make the radio button response appear correctly as you browse forward/backward between sections.
In turn you will get a lot of notices which must be suppressed by setting the error-level:
Notice: Undefined offset: -1 in /var/www/vhosts/fbumonacom/www/phpESP/admin/include/lib/espresponse.inc on line 514
Notice: Undefined offset: -1 in /var/www/vhosts/fbumonacom/www/phpESP/admin/include/lib/espresponse.inc on line 514
Notice: Undefined offset: 3 in /var/www/vhosts/fbumonacom/www/phpESP/public/handler.php on line 386
Notice: Undefined offset: 4 in /var/www/vhosts/fbumonacom/www/phpESP/public/handler.php on line 386
Notice: Undefined offset: 3 in /var/www/vhosts/fbumonacom/www/phpESP/public/handler.php on line 386
Notice: Undefined offset: 4 in /var/www/vhosts/fbumonacom/www/phpESP/public/handler.php on line 386
Notice: Undefined offset: 3 in /var/www/vhosts/fbumonacom/www/phpESP/public/handler.php on line 386
Notice: Undefined offset: 4 in /var/www/vhosts/fbumonacom/www/phpESP/public/handler.php on line 386
Any thoughts on this would really be appreciated.
Thanks
Søren Voigt
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/phpesp/bugs/232/ https://sourceforge.net/p/phpesp/bugs/232
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/ https://sourceforge.net/auth/subscriptions
Related
Bugs: #232
Should we update the front page here to point to that repo? If development is continuing there, seems like a good idea.
Hi Matthew, yes I think that would be a good idea.
And anybody willing to help maintaining the github branch is of course welcome.