View Issue Details

IDProjectCategoryView StatusLast Update
17273Bug reportsInstallationpublic2021-04-26 16:19
Reporterrrrnrrr Assigned To 
PrioritynoneSeverityminor 
Status newResolutionopen 
Product Version3.25.20 
Summary17273: Data too long for column 'surveyls_welcometext'
DescriptionThis is a duplicate from bug 15502, which was closed since not reproducable.
Upon upgrading from a 2.71.1+170927 to 3.26.0+210419 (DB versions 358 to 365), the updater will complain that he cannot update the database due to the given message. Please note that also the original reporter from 15502 was making an upgrade from DB version 358 to 359.

I did not investigate it too much, but this is my finding which made me upgrade the version:
The problem seems to be that in ll.2420 of application/helpers/update/updatedb_helper.php, the type of all the text fields in table surveys_languagesettings is changed to 'text' if the DB version is below 358.
In ll.2492, the fields are changed to 'mediumtext' without anything happening in the update script in between.
The original text fields for me were in 'mediumtext COLLATE utf8mb4_unicode_ci', thus, upon changing them, I guess there were some entries for the welcome messages entered by users which are too long for 'text'.

When commenting out these lines, it works.

PS: Please note that I wanted to put in the version field 3.26.0, but that seems not possible so far.
Additional Information--- application/helpers/update/updatedb_helper.php.org 2021-04-26 15:56:22.181624012 +0200
+++ application/helpers/update/updatedb_helper.php 2021-04-26 15:56:58.244766662 +0200
@@ -2417,20 +2417,20 @@
             $oTransaction = $oDB->beginTransaction();
             alterColumn('{{notifications}}','message',"text",false);
             alterColumn('{{settings_user}}','stg_value',"text",true);
- alterColumn('{{surveys_languagesettings}}','surveyls_description',"text",true);
- alterColumn('{{surveys_languagesettings}}','surveyls_welcometext',"text",true);
- alterColumn('{{surveys_languagesettings}}','surveyls_endtext',"text",true);
- alterColumn('{{surveys_languagesettings}}','surveyls_policy_notice',"text",true);
- alterColumn('{{surveys_languagesettings}}','surveyls_policy_error',"text",true);
- alterColumn('{{surveys_languagesettings}}','surveyls_url',"text",true);
- alterColumn('{{surveys_languagesettings}}','surveyls_email_invite',"text",true);
- alterColumn('{{surveys_languagesettings}}','surveyls_email_remind',"text",true);
- alterColumn('{{surveys_languagesettings}}','surveyls_email_register',"text",true);
- alterColumn('{{surveys_languagesettings}}','surveyls_email_confirm',"text",true);
- alterColumn('{{surveys_languagesettings}}','surveyls_attributecaptions',"text",true);
- alterColumn('{{surveys_languagesettings}}','email_admin_notification',"text",true);
- alterColumn('{{surveys_languagesettings}}','email_admin_responses',"text",true);
- alterColumn('{{surveys_languagesettings}}','surveyls_numberformat',"integer",false,'0');
+// alterColumn('{{surveys_languagesettings}}','surveyls_description',"text",true);
+// alterColumn('{{surveys_languagesettings}}','surveyls_welcometext',"text",true);
+// alterColumn('{{surveys_languagesettings}}','surveyls_endtext',"text",true);
+// alterColumn('{{surveys_languagesettings}}','surveyls_policy_notice',"text",true);
+// alterColumn('{{surveys_languagesettings}}','surveyls_policy_error',"text",true);
+// alterColumn('{{surveys_languagesettings}}','surveyls_url',"text",true);
+// alterColumn('{{surveys_languagesettings}}','surveyls_email_invite',"text",true);
+// alterColumn('{{surveys_languagesettings}}','surveyls_email_remind',"text",true);
+// alterColumn('{{surveys_languagesettings}}','surveyls_email_register',"text",true);
+// alterColumn('{{surveys_languagesettings}}','surveyls_email_confirm',"text",true);
+// alterColumn('{{surveys_languagesettings}}','surveyls_attributecaptions',"text",true);
+// alterColumn('{{surveys_languagesettings}}','email_admin_notification',"text",true);
+// alterColumn('{{surveys_languagesettings}}','email_admin_responses',"text",true);
+// alterColumn('{{surveys_languagesettings}}','surveyls_numberformat',"integer",false,'0');
             alterColumn('{{user_groups}}','description',"text",false);
             $oDB->createCommand()->update('{{settings_global}}', ['stg_value'=>359], "stg_name='DBVersion'");
             $oTransaction->commit();
TagsNo tags attached.
Complete LimeSurvey version number (& build)3.26.0+210419
I will donate to the project if issue is resolvedNo
Browser
Database & DB-VersionMariaDB 10.3, 358
Server OS (if known)Debian 10.9
Webserver software & version (if known)Apache 2.4
PHP Version7.3

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2021-04-26 16:19 rrrnrrr New Issue