View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
17189 | Bug reports | Import/Export | public | 2021-03-17 13:00 | 2021-03-22 15:27 |
Reporter | zufolo441 | Assigned To | c_schmitz | ||
Priority | none | Severity | partial_block | ||
Status | closed | Resolution | fixed | ||
Product Version | 4.4.13 | ||||
Summary | 17189: wrong field size in SPSS syntax export | ||||
Description | Hi, when I export data in SPSS, the size of text field is always 1: I suppose the problem is in row 398 of export_helper.php
| ||||
Steps To Reproduce | export syntax file of SPSS. | ||||
Tags | No tags attached. | ||||
Bug heat | 8 | ||||
Complete LimeSurvey version number (& build) | 4.4.13 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | PostgreSQL 11.9 | ||||
Server OS (if known) | |||||
Webserver software & version (if known) | |||||
PHP Version | 7.1.33 | ||||
in the function stringSize(), the variable $lengthReal has empty value. DB is PostgreSQL. |
|
I found the problem: SELECT LENGTH("734558X76X2746") FROM "lime_survey_734558" ORDER BY LENGTH("734558X76X2746") DESC For PostgreSQL, LENGTH(NULL) = NULL, so, that query puts NULL values as first rows. The result is that queryScalar() returns NULL if at least one field in column is null, and stringSize() almost always return 1 as field length. I had to modify function in this way, by adding a WHERE condition: function stringSize($sColumn)
} ...and problem solved, at least for me: I cannot try this in other DB. |
|
Great : can you create a pull request ? |
|
Fix committed to 3.x-LTS branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=31340 |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=31341 |
|
Fixed in Release 4.4.14+210322 |
|
LimeSurvey: 3.x-LTS 2eaeaeae 2021-03-17 21:17 Details Diff |
Fixed issue 17189: Wrong field size in SPSS syntax export |
Affected Issues 17189 |
|
mod - application/helpers/export_helper.php | Diff File | ||
LimeSurvey: master 8e2f185c 2021-03-17 21:17 Details Diff |
Fixed issue 17189: Wrong field size in SPSS syntax export when using Postgres |
Affected Issues 17189 |
|
mod - application/helpers/export_helper.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-03-17 13:00 | zufolo441 | New Issue | |
2021-03-17 16:43 | zufolo441 | Note Added: 63408 | |
2021-03-17 17:19 | zufolo441 | Note Added: 63411 | |
2021-03-17 17:26 | DenisChenu | Note Added: 63414 | |
2021-03-17 20:17 | c_schmitz | Changeset attached | => LimeSurvey 3.x-LTS 2eaeaeae |
2021-03-17 20:17 | c_schmitz | Note Added: 63419 | |
2021-03-17 20:17 | c_schmitz | Assigned To | => c_schmitz |
2021-03-17 20:17 | c_schmitz | Resolution | open => fixed |
2021-03-17 20:21 | c_schmitz | Changeset attached | => LimeSurvey master 8e2f185c |
2021-03-17 20:21 | c_schmitz | Note Added: 63420 | |
2021-03-17 20:21 | c_schmitz | Status | new => resolved |
2021-03-22 15:27 | lime_release_bot | Note Added: 63533 | |
2021-03-22 15:27 | lime_release_bot | Status | resolved => closed |