Welcome, Guest
Username: Password: Remember me

TOPIC: BUG in second language? Need help - we must go online SOON!

BUG in second language? Need help - we must go online SOON! 3 months 3 weeks ago #102812

  • olectrix
  • olectrix's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
We are doing a scientific survey in two languages... or we´d like to... :/

Basic language is Danish, second language is German.
4 categories/groups of questions
ca. 25 Questions

When choosing "edit" the FIRST question in the FIRST category of questions the following ERROR occurs:

"Internal Server Error
The active record cannot be inserted to database because it is not new.

An internal error occurred while the Web server was processing your request. Please contact the webmaster to report this problem.

Thank you.
2013-12-22 21:28:25"

There should be mentioned that this question uses a >text-box< as answer-option (so that the user has to write something)- It seems that we can reproduce the error with the long and the small text-box or with all text-answer-options!

This results in an destroyed german survey, where every second time you choose the "next button", the user will see NO question.

In the BACKEND it seems that the WHOLE survey somehow has errors from that point, because when editing or saving questions the survey the above shown error occurs.

I am not a programmer - but could it be that the database-call for strings, which is needed when text has to be saved/copied into the database, has an error, since the error-message is: "The active record cannot be inserted to database because it is not new." ?


We a writing a 30 Page long university-lecture, which hast to be finished in January the 9th - and we still have NO survey online, because of these issues. We would really appreciate any FAST help!

We will donate an small amount of money to the project, when there´s a chance to get our survey successfully online without errors in the next TWO days - because there´s not much time left for us.

if we can not make it work - 5 days of work will be lost without any results :( - and we have to use expensive tools like "survey-monkey" instead ... we think it is better that THIS project gets the money, if we can solve the issue together.

please help :(


screenshot-error1.png
Last Edit: 3 months 3 weeks ago by olectrix. Reason: screenshot
The administrator has disabled public write access.

BUG in second language? Need help - we must go online SOON! 3 months 3 weeks ago #102813

  • olectrix
  • olectrix's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
And another error-message:

"Internal Server Error
CDbCommand failed to execute the SQL statement: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens

An internal error occurred while the Web server was processing your request. Please contact the webmaster to report this problem.

Thank you.
2013-12-22 22:05:01"
The administrator has disabled public write access.

BUG in second language? Need help - we must go online SOON! 3 months 3 weeks ago #102815

  • olectrix
  • olectrix's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
I could reproduce the error with any new survey, by doing the following:

1 - Make a survey in danish (or another language)
2 - add german as second language (or another language)

3 - add 1 question-group/category
4 - add the first question in the firs group and edit it in both languages (this could also be english and afrikaans!) and save

5 - When you try to hit the "edit" button of this question again, the following error occurs:

"Internal Server Error
The active record cannot be inserted to database because it is not new.

An internal error occurred while the Web server was processing your request. Please contact the webmaster to report this problem.

Thank you."

This happens as soon as you define a second language in your survey!

Anyone able to reproduce this on your installation?

Any workarounds?
The administrator has disabled public write access.

BUG in second language? Need help - we must go online SOON! 3 months 3 weeks ago #102817

  • apmuthu
  • apmuthu's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Thank you received: 1
  • Karma: 0
This issue has been solved by making the qid the same for both languages in the lime_questions table. To enable multi sequence for compound key comprising one auto_increment (qid) column and another column (language), the auto_increment column must not be the first in he primary key order.

Switch the primary key from being (qid, language) to (language, qid). Make sure to set the existing AUTO_INCREMENT values to the correct one and adjust all old entries as desired. The lime_answers table will also need to be corrected for qid values if changed in lime_questions.

There is a bug report with fix in the bug tracker.
bugs.limesurvey.org/view.php?id=8446

The fix is as below:
ALTER TABLE `lime_questions` DROP PRIMARY KEY, ADD PRIMARY KEY (`language`, `qid`);
Last Edit: 3 months 3 weeks ago by apmuthu. Reason: typo
The administrator has disabled public write access.
The following user(s) said Thank You: DenisChenu

BUG in second language? Need help - we must go online SOON! 3 months 3 weeks ago #102823

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 5830
  • Thank you received: 711
  • Karma: 220
apmuthu : did your install was directly made in 2.05 ? Or with a 2.00 ?
The administrator has disabled public write access.

BUG in second language? Need help - we must go online SOON! 3 months 3 weeks ago #102833

  • apmuthu
  • apmuthu's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Thank you received: 1
  • Karma: 0
2.05+ from GitHub as well as the v2.05 release
The administrator has disabled public write access.

BUG in second language? Need help - we must go online SOON! 3 months 3 weeks ago #102846

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 5830
  • Thank you received: 711
  • Karma: 220
Then really don't understand what happe:

github.com/LimeSurvey/LimeSurvey/blob/ma...reate-mysql.sql#L287

PRIMARY KEY (`qid`,`language`)

???
The administrator has disabled public write access.

BUG in second language? Need help - we must go online SOON! 3 months 3 weeks ago #102850

  • olectrix
  • olectrix's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
OK - this is too technical for us to understand.

We have made a fresh install of limesurvey205plus-build131219(.zip). some days ago - this is the version we are using. We have made NO upgrade or anything.

Now: Is there any fast "fix" or "workaround" ... any code I can paste into some file, or do we have to make two different surveys each for any language, instead of using the obvious buggy multilingual-feature in ONE survey?
The administrator has disabled public write access.

BUG in second language? Need help - we must go online SOON! 3 months 3 weeks ago #102858

  • apmuthu
  • apmuthu's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Thank you received: 1
  • Karma: 0
  • The existing code creates the lime_questions table with the PRIMARY KEY (`qid`, `language`)
  • We need to correct it by reversing the order of the columns in the key to be PRIMARY KEY (`language`, `qid`)
  • Hence the need to run the said sql statement on the limesurvey database after installation but before usage.
  • Otherwise, edit the schema file before installation.

The reasons, details and references are available at:
bugs.limesurvey.org/view.php?id=8446

The following sql statement can be run from phpMyAdmin or some mysql client:
ALTER TABLE `lime_questions` DROP PRIMARY KEY, ADD PRIMARY KEY (`language`, `qid`);

There is no harm in accidentally running the above sql statement more than once.
Last Edit: 3 months 3 weeks ago by apmuthu.
The administrator has disabled public write access.

BUG in second language? Need help - we must go online SOON! 3 months 3 weeks ago #102867

  • apmuthu
  • apmuthu's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Thank you received: 1
  • Karma: 0
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.222 seconds
Donation Image