Affects Version/s: 4.0.1
Fix Version/s: None
Component/s: Legacy > Extensions > eZ Survey
PHP Version: (please be specific, like '4.4.3' or '5.1.5') 5.2.x
Database and version:mysql 5
Browser (and version):FF3, IE7
since the survey is an attribute on a contentclass, it is affected by this default setting in settings/content.ini:
so if you continue to modify the survey after it has been published and used, you will increase the number of versions of the contentobject, and eZ Publish will start removing version of the object later than version 10 upon re-publishing.
the problem is that this will also delete the already received surveys.
this has been tested on a LAMP production environment, and on a local WAMP environment, with the eZ Survey 2.0 distribution.
ps: please add a eZ Survey 2 "Affected version" option to the issue tracker.
1. on ezp401 vanilla, install ezsurvey 2.0
2. install standard contentclass packages
3. create a survey with text input field
4. fill out and submit the survey
5. republish survey 10 times (increasing version # to 11)
6. list all the received surveys in admin interface.
the first survey submitted is still available
the first submitted survey is gone.
suggestion for solution (not investigated though):
the ezsurvey datatype may implement a method called "OnPublish"or something similar, which may be triggered just in time to prevent eZ Publish from removing the surveys filled out with a version that is about to be deleted.
since this may mean that you end up with surveys in the database with more or less fields than the actual published survey (or any of the 10 version stored in the database), some decision on behavior needs to be made.
for instance, only fields in the published survey object are used in the templates.
additional fields in the collected survey will not be displayed.
non-existing fields in the collected survey will display false or empty string.
a workaround may be to increase the number of versions of the survey class stored, but this is not very intuitive, since this functionality is based on class ID:
so if the user creates a new survey contentclass, eZ Publish will only store 10 versions of objects based on it.