#6: Bug Fixes
- Contents
Fix Bugs reported by users
- Proposed by
- adamu
- Proposal type
- User interface, Architecture
- Assigned to release
- State
- completed
Motivation
Using this as a place to record bugs reported by users.
Proposal
I think I’ve found a bug in spreadsheet2.py in the following line:
line.append(" + test(question.getCommentsFor(user), question.getCommentsFor(user).replace(","'"), "Blank") + ")
When a user doesn’t finish a questionnaire, but submits it any way, ignoring the flagged questions (arghhh!),
question.getCommentsFor(user) evaluates to None (NULL). This throws an exception, as it should, when managers try to view the detailed
results, which generates a site error “… None type has no attribute replace”.
I put in a test: if question.getCommentsFor(user): around this line and everything works fine.
Just thought you should know. If there is a better work around or a new version please let me know.
-----
Hi there, just wanted to let you know about a possible bug in CMFQuestions-0.4.
If "Answer options" is left blank, I get an IndexError (even if the question doesn't need choices, like for a text field). Looks like the exception originates from line 87 of questionnaire_view.pt:
-----
trying to view detailed spreadsheet (csv) results in the following error:
Traceback (innermost last):
Module ZPublisher.Publish, line 101, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 39, in call_object
Module Products.CMFCore.FSPythonScript, line 104, in __call__
Module Shared.DC.Scripts.Bindings, line 306, in __call__
Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
Module Products.CMFCore.FSPythonScript, line 160, in _exec
Module None, line 19, in spreadsheet2
- NoneType object has no attribute replace
Possible Fix
Suggested by CB
for user in context.getRespondents(): line = [] line.append("+ test(user, user, "Anonymous") +") for question in context.getAllQuestions(): answer = question.getAnswerFor(user) try: answer = answer.replace(","'") except: answer = "Blank" line.append("+ answer +")
----
a number of users have reported that even though the clicked on the "Submit" button, they got the response that "Your data has been saved. Don't forget to complete it" etc. Thinking that they must have hit the wrong button, I removed the "Save" button, but still they got the same response. At the end, I even change the portal_skins/questions/questionnaire_answer script :
##if form.get(submit.x, ''):
submit = True
but no success. Do you have an idea what could be the problem? Cookies? Old browsers?

