Welcome, Guest
Username: Password: Remember me

TOPIC: Missing 'question code'

Missing 'question code' 3 years 9 months ago #51114

  • khoy
  • khoy's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 19
  • Karma: 0
When a question with a blank question code('title' field in questions table)is imported in LS( as single question, within group or survey) and the question is not edited again, Limesurvey doesn't check this code anymore and it stays blank. The field is mandatory when entering a question from scratch or when editing the question. This caused errors in some of our surveys.
Any idea concerning this ?
The administrator has disabled public write access.

Re:Missing 'question code' 3 years 9 months ago #51120

  • mdekker
  • mdekker's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 341
  • Thank you received: 68
  • Karma: 38
I don't see how you can export a survey with a blank question code as you always need to input one. The only way it is possible to do so is when you manually change the export file or the database, which means LS will not handle the errors you introduced yourself.

If it is a survey you import a lot I would suggest import it, fix missing question codes and replace your 'template survey' with a correct export.
---
Menno Dekker
The administrator has disabled public write access.

Re:Missing 'question code' 3 years 9 months ago #51122

  • khoy
  • khoy's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 19
  • Karma: 0
True, they must have changed it manually but we can't control how our LS users (+80 users) handle their exported files. We just try to fix the problem.
The administrator has disabled public write access.

Re:Missing 'question code' 3 years 9 months ago #51140

  • DenisChenu
  • DenisChenu's Avatar
  • NOW ONLINE
  • Moderator Lime
  • Posts: 6228
  • Thank you received: 793
  • Karma: 238
You can make a bug report, LScan test if all question code are clean before import.

But according to mdekker : we can't correct errors you introduced yourself.
The administrator has disabled public write access.

Re:Missing 'question code' 3 years 9 months ago #51210

  • jooghe
  • jooghe's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 9
  • Karma: 0
I think the point here is that checks that are done when you enter questions in an interactive way are not executed when the question is imported. And importing is just another way of entering a question,so it should be validated otherwise it could be used to circumvent checks (eg. on entering javascript).
From that point of view it's needed to maintain the integrity of the system and then it's not just about one user's problem.

So I think it's best to enter a bug report.

BTW, I'm a colleague of Khoy, so we share the same concerns.

Thanks for your feedback.
The administrator has disabled public write access.

Re:Missing 'question code' 3 years 9 months ago #51219

  • mdekker
  • mdekker's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 341
  • Thank you received: 68
  • Karma: 38
The only thing this will probably fix is that the broken export will no longer import. It might have some fallback to drop the questions without question code... or assign a random code to it.
So the problem will be exposed earlier than when there are no checks but the fix has to be done at the root.

I noticed something in SVN about it. Didn't check what the fix was about. Will put the bug ID here just in case someone hits it from google. So they can check the solution.

bugs.limesurvey.org/view.php?id=4692
---
Menno Dekker
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.118 seconds
Donation Image