View Issue Details

This issue affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
18576Bug reportsOtherpublic2026-10-20 17:06
Reporteruser163119Assigned Toc_schmitz  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
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 heat8
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
Git branch / Pull Request URL

Users monitoring this issue

There are no users monitoring this issue.

Activities

gabrieljenik

gabrieljenik

2023-01-03 15:30

developer   ~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?

user163119

2023-01-03 18:06

  ~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

developer   ~73339

Ohh, I see.

gabrieljenik

gabrieljenik

2023-01-31 20:50

developer   ~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

developer   ~75054

Thoughts on the approach?

c_schmitz

c_schmitz

2026-10-18 01:02

administrator   ~86531

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=40912

LimeBot

LimeBot

2026-10-20 17:06

administrator   ~86600

Fixed in Release 7.7.0+261020

Related Changesets

LimeSurvey: master 782a29a8

2026-10-18 01:02

c_schmitz


Details Diff
Fixed issue 18576: Page size options set in config.php were added to the default options, so the rows-per-page dropdown showed duplicates and some entries set the wrong page size
Dev Integer-keyed pageSizeOptions/pageSizeOptionsTokens from config.php now replace the internal defaults instead of being appended by CMap::mergeArray()
Affected Issues
18576
mod - application/config/internal.php Diff File
add - application/helpers/ConfigMergeHelper.php Diff File
add - tests/unit/helpers/ConfigMergeHelperTest.php Diff File

Issue History

Date Modified Username Field Change
2023-01-02 12:21 user163119 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 user163119 Note Added: 73338
2023-01-03 18:06 user163119 File Added: grafik.png
2023-01-03 18:06 user163119 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
2026-10-18 01:02 c_schmitz Changeset attached => LimeSurvey master 782a29a8
2026-10-18 01:02 c_schmitz Note Added: 86531
2026-10-18 01:02 c_schmitz Assigned To ollehar => c_schmitz
2026-10-18 01:02 c_schmitz Status feedback => resolved
2026-10-18 01:02 c_schmitz Resolution open => fixed
2026-10-18 01:02 c_schmitz Bug heat 4 => 6
2026-10-20 17:06 LimeBot Note Added: 86600
2026-10-20 17:06 LimeBot Status resolved => closed
2026-10-20 17:06 LimeBot Bug heat 6 => 8