Dependency Graph
View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
17233 | Bug reports | Survey taking | public | 2021-04-08 14:22 | 2021-07-12 11:53 |
Reporter | ollehar | Assigned To | c_schmitz | ||
Priority | normal | Severity | partial_block | ||
Status | closed | Resolution | fixed | ||
Product Version | 4.4.15 | ||||
Target Version | 4.x.0-dev | ||||
Summary | 17233: Question index is broken for the attached survey (postgres only) | ||||
Description | Title. | ||||
Steps To Reproduce |
| ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 24 | ||||
Complete LimeSurvey version number (& build) | latest master | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | - | ||||
Database type & version | postgres 10 | ||||
Server OS (if known) | - | ||||
Webserver software & version (if known) | - | ||||
PHP Version | 7.4 | ||||
But question index is not activated ? I don't understand … If you activate : it work |
|
Why is it visible if it's not activated? Maybe that's the issue? |
|
I don't understand , On 4.4.16 from yesterday Let me check with a new update |
|
Yeah? OK, maybe it's a fresh issue from today then (latest master). |
|
$ git pull |
|
Last master … same See screencast. Caching issue ? Or maybe on Survey Group settings ? |
|
Let me import and test... |
|
Same issue at import. I'm using postgres, but that can't matter, can it? PHP 7.4 |
|
|
|
OK : PG related Same with Disabled forced on PG : see the index in twig. PS : checking Navigation delay (seconds): iwith same survey In PG : show -1 |
|
DB driver : 12.6 |
|
(I always think usage of -1 is a bad idea for inherit … NULL is better) |
|
Uh, why this discrepancy? |
|
Related to true/false? |
|
-1 is not used for inherited ? and 0 for disable ? |
|
Might be relevant: https://stackoverflow.com/a/1942779/2138090 "The MySQL BOOLEAN (alias BOOL, alias TINYINT(1) ) is not compatible with the pg boolean type" Basically, we should never use BOOL as a database type? But we aren't already? |
|
It appears that the Postgres driver delivers real int values and some of the inheritance comparisons are too strict by comparing to string '-1'. |
|
https://github.com/LimeSurvey/LimeSurvey/commit/bd0b4c1ef126401fbddbe272f01d6f15178633c3 |
|
17058 is a possible duplicate |
|
issue with == is more for false. And -1 is never false. |
|
Kind of solved by not using ===, but a better solution would be to fix the drivers around MySQL and Postgresql to behave the same, I guess. Or make sure an attribute is either a string or an int, not randomly one or the other. |
|
Lol : if ((empty($instance->oOptions->{$attribute})) || (!empty($instance->oOptions->{$attribute}) && ($instance->oOptions->{$attribute} === 'inherit' || $instance->oOptions->{$attribute} === 'I' || $instance->oOptions->{$attribute} == '-1'))) { then : inherit is :
Maybe start by "inherit" system fix |
|
I have to admit I raised my eye brows...... Added to code quality guide as an example of a messy if-statement. :| |
|
Should be wrapped in a method $attribute->isInherit(); |
|
Yes, and inherited value is set for each attribute :) For example dropdown can easily use "" :) But string and integer are better if it's null :( |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=31581 |
|
Release done. |
|
LimeSurvey: master bd0b4c1e 2021-04-14 15:58:28 Details Diff |
Fixed issue 17233: Inheritance broken for some survey properties when using Postgres SQL |
Affected Issues 17233 |
|
mod - application/models/SurveysGroupsettings.php | Diff File | ||
mod - application/views/admin/survey/subview/accordion/_presentation_panel.php | Diff File | ||
mod - application/views/admin/survey/subview/accordion/_tokens_panel.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-04-08 14:22 | ollehar | New Issue | |
2021-04-08 14:22 | ollehar | File Added: survey_archive_277644.lsa | |
2021-04-08 14:23 | ollehar | Priority | none => normal |
2021-04-08 15:21 | DenisChenu | Note Added: 63869 | |
2021-04-08 15:21 | DenisChenu | File Added: Capture d’écran_2021-04-08_15-21-09.png | |
2021-04-08 15:51 | ollehar | Note Added: 63870 | |
2021-04-08 15:55 | DenisChenu | Note Added: 63871 | |
2021-04-08 15:55 | ollehar | Note Added: 63872 | |
2021-04-08 15:58 | DenisChenu | Note Added: 63873 | |
2021-04-08 15:58 | DenisChenu | File Added: Peek 08-04-2021 15-57.gif | |
2021-04-08 15:58 | DenisChenu | Note Added: 63874 | |
2021-04-08 15:59 | ollehar | Note Added: 63875 | |
2021-04-08 16:02 | ollehar | Note Added: 63876 | |
2021-04-08 16:02 | ollehar | File Added: Selection_012.png | |
2021-04-08 16:02 | ollehar | Database & DB-Version | - => postgres 10 |
2021-04-08 16:02 | ollehar | PHP Version | - => 7.4 |
2021-04-08 16:06 | ollehar | Note Added: 63877 | |
2021-04-08 16:06 | ollehar | File Added: Selection_013.png | |
2021-04-08 16:07 | DenisChenu | Note Added: 63878 | |
2021-04-08 16:07 | DenisChenu | File Added: Capture d’écran_2021-04-08_16-05-47.png | |
2021-04-08 16:08 | DenisChenu | Note Added: 63879 | |
2021-04-08 16:08 | DenisChenu | File Added: Capture d’écran_2021-04-08_16-08-43.png | |
2021-04-08 16:09 | DenisChenu | Note Added: 63880 | |
2021-04-08 16:09 | ollehar | Note Added: 63881 | |
2021-04-08 16:24 | ollehar | Note Added: 63882 | |
2021-04-08 16:40 | DenisChenu | Note Added: 63883 | |
2021-04-08 17:30 | ollehar | Summary | Question index is broken for the attached survey => Question index is broken for the attached survey (postgres only) |
2021-04-12 11:17 | c_schmitz | Sync to Zoho Project | => |Yes| |
2021-04-12 11:33 | ollehar | Note Added: 63910 | |
2021-04-12 12:03 | c_schmitz | Sync to Zoho Project | Yes => |
2021-04-12 12:03 | c_schmitz | Sync to Zoho Project | => |Yes| |
2021-04-12 12:05 | c_schmitz | Sync to Zoho Project | Yes => |
2021-04-12 12:05 | c_schmitz | Sync to Zoho Project | => |Yes| |
2021-04-12 12:06 | c_schmitz | Sync to Zoho Project | Yes => |
2021-04-12 12:06 | c_schmitz | Sync to Zoho Project | => |Yes| |
2021-04-12 12:10 | c_schmitz | Sync to Zoho Project | Yes => |
2021-04-12 12:11 | c_schmitz | Sync to Zoho Project | => |Yes| |
2021-04-12 12:11 | c_schmitz | Sync to Zoho Project | Yes => |
2021-04-12 12:11 | c_schmitz | Sync to Zoho Project | => |Yes| |
2021-04-12 12:14 | c_schmitz | Assigned To | => c_schmitz |
2021-04-12 12:14 | c_schmitz | Status | new => assigned |
2021-04-14 15:59 | c_schmitz | Status | assigned => ready for testing |
2021-04-14 16:01 | c_schmitz | Note Added: 63938 | |
2021-04-14 16:03 | c_schmitz | Note Added: 63939 | |
2021-04-14 16:08 | c_schmitz | Relationship added | related to 17058 |
2021-04-14 16:08 | c_schmitz | Note Added: 63940 | |
2021-04-14 16:19 | DenisChenu | Note Added: 63941 | |
2021-04-15 11:53 | ollehar | Status | ready for testing => resolved |
2021-04-15 11:53 | ollehar | Resolution | open => fixed |
2021-04-15 11:53 | ollehar | Note Added: 63947 | |
2021-04-15 11:54 | ollehar | Note Edited: 63947 | |
2021-04-15 13:05 | c_schmitz | Relationship replaced | has duplicate 17058 |
2021-04-15 13:31 | DenisChenu | Note Added: 63952 | |
2021-04-15 13:44 | ollehar | Note Added: 63953 | |
2021-04-15 13:44 | ollehar | Note Added: 63954 | |
2021-04-15 13:52 | DenisChenu | Note Added: 63955 | |
2021-04-15 14:23 | c_schmitz | Changeset attached | => LimeSurvey master bd0b4c1e |
2021-04-15 14:23 | c_schmitz | Note Added: 63956 | |
2021-07-12 11:53 | c_schmitz | Note Added: 65279 | |
2021-07-12 11:53 | c_schmitz | Status | resolved => closed |