View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
18576Bug reportsOtherpublic2023-05-17 23:36
Reporterbismark Assigned Toollehar  
PrioritynoneSeverityminor 
Status feedbackResolutionopen 
Product Version5.4.x 
Summary18576: pageSizeParams merged instead of replaced
Description

we want to replace params-array from application/config/internal.php but values will be merged

'params' => array(
        'defaultPageSize' => 10, // Default page size for most of the grids
        'pageSizeOptions' => array(5 => 5, 10 => 10, 20 => 20, 50 => 50, 100 => 100), // Default page size options for most of the grids
        'pageSizeOptionsTokens' => array(5 => 5, 10 => 10, 25 => 25, 50 => 50, 100 => 100, 250 => 250, 500 => 500, 1000 => 1000, 2500 => 2500, 5000 => 5000, 10000 => 10000), // Tokens needs different options
        'defaultEllipsizeHeaderValue' => 30, // Default max characters before ellipsizing the headers of responses grid
        'defaultEllipsizeQuestionValue' => 50, // Default max characters before ellipsizing the questions inside responses grid
    ),
Steps To Reproduce

Steps to reproduce

(Replace this text with detailed step-by-step instructions on how to reproduce the issue)

Expected result

(Write here what you expected to happen)

Actual result

(Write here what happened instead)

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)5.3.x 5.4.0
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMySQL
Server OS (if known)
Webserver software & version (if known)
PHP Version8.0

Users monitoring this issue

There are no users monitoring this issue.

Activities

gabrieljenik

gabrieljenik

2023-01-03 15:30

manager   ~73335

we want to replace params-array from application/config/internal.php but values will be merged

As to clarify, what do you mean by merged?

bismark

bismark

2023-01-03 18:06

reporter   ~73338

adding this to config.php, it results in the grafic

'params' => array(
        'defaultPageSize'=>20, // Default page size for most of the grids
        'pageSizeOptions'=>array(10=>10, 20=>20, 50=>50, 100=>100, 250=>250, 500=>500), // Default page size options for most of the grids
        'pageSizeOptionsTokens'=>array(5=>5, 10=>10, 25=>25, 50=>50, 100=>100, 250=>250, 500=>500, 1000=>1000, 2500=>2500, 5000=>5000, 10000=>10000), // Tokens needs different options
        'defaultEllipsizeHeaderValue'=>30, // Default max characters before ellipsizing the headers of responses grid
        'defaultEllipsizeQuestionValue'=>50, // Default max characters before ellipsizing the questions inside responses grid
    ),
grafik.png (13,581 bytes)   
grafik.png (13,581 bytes)   
gabrieljenik

gabrieljenik

2023-01-03 18:32

manager   ~73339

Ohh, I see.

gabrieljenik

gabrieljenik

2023-01-31 20:50

manager   ~73627

I believe the simplest is to create a new file "config-after.php", which holds a function which shall be called as a hook to update as much as wanted the final config array.

Not sure how spreaded this problem is.

The function could be an item of the config array itself and be addedd to the config.php

gabrieljenik

gabrieljenik

2023-05-17 23:36

manager   ~75054

Thoughts on the approach?

Issue History

Date Modified Username Field Change
2023-01-02 12:21 bismark New Issue
2023-01-03 15:30 gabrieljenik Note Added: 73335
2023-01-03 15:30 gabrieljenik Bug heat 0 => 2
2023-01-03 18:06 bismark Note Added: 73338
2023-01-03 18:06 bismark File Added: grafik.png
2023-01-03 18:06 bismark Bug heat 2 => 4
2023-01-03 18:32 gabrieljenik Note Added: 73339
2023-01-31 20:46 gabrieljenik Status new => confirmed
2023-01-31 20:50 gabrieljenik Note Added: 73627
2023-02-16 16:39 gabrieljenik Assigned To => gabrieljenik
2023-02-16 16:39 gabrieljenik Status confirmed => assigned
2023-05-17 23:36 gabrieljenik Assigned To gabrieljenik => ollehar
2023-05-17 23:36 gabrieljenik Status assigned => feedback
2023-05-17 23:36 gabrieljenik Note Added: 75054