View Issue Details

This issue affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
20410Bug reportsSurvey editingpublic2026-02-28 00:33
ReporterDenisChenu Assigned To 
PrioritynoneSeverityminor 
Status newResolutionopen 
Summary20410: Url set for kcfinder link is bad if baseUrl is set
Description

When config.php needs to be updated for baseUrl : it breaks the call of kcfinder link and ressource

Steps To Reproduce

Steps to reproduce

Setup your system, with subdirectory or not
Test, check survey ressource
According to your cirrent baseUrl setup request['baseUrl' => ''] in config.php
Check survey resource with console

Expected result

See the same screen without 404

Actual result

Broken screen with 404

TagsNo tags attached.
Attached Files
with_baseUrl.png (215,082 bytes)
null_baseUrl.png (265,533 bytes)
Bug heat8
Complete LimeSurvey version number (& build)6.16.4
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionnot relevant
Server OS (if known)debian
Webserver software & version (if known)nginx
PHP Version8.4

Users monitoring this issue

Bross

Activities

DenisChenu

DenisChenu

2026-01-22 09:20

developer   ~84124

Checked too with 6.15.4+250710
nginx + url rewriting

Bross

Bross

2026-02-26 10:27

reporter   ~84324

Hi, we've encountered the same problem. Attached is a patch that removes the baseurl part.

limesurvey-kcfinder.patch (494 bytes)   
--- vendor/kcfinder/tpl/tpl_browser.php.orig	2026-02-26 09:17:45.362037179 +0000
+++ vendor/kcfinder/tpl/tpl_browser.php	2026-02-26 09:17:52.026049182 +0000
@@ -2,7 +2,6 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>KCFinder: /<?php echo $this->session['dir'] ?></title>
-<base href="<?= Yii::app()->request->getBaseUrl() ?>/">
 <link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
 <?php INCLUDE "tpl/tpl_css.php" ?>
 <?php INCLUDE "tpl/tpl_javascript.php" ?>
limesurvey-kcfinder.patch (494 bytes)   
DenisChenu

DenisChenu

2026-02-26 10:48

developer   ~84325

If i remind , added for a security issue :(

Maybe must be Yii::app()->request->getBaseUrl() . '/vendor/kcfinder'

DenisChenu

DenisChenu

2026-02-26 10:49

developer   ~84326

Got it : https://github.com/LimeSurvey/LimeSurvey/commit/f495e4fc65e9f608b21b1c8cda9f7c58882a5914

Bross

Bross

2026-02-26 11:49

reporter   ~84327

Okay, no idea what they tried to fix and the conversation in the issues doesn't spark confidence. It was for sure not tested, because it's broken since this 'fix'.

Bross

Bross

2026-02-27 12:15

reporter   ~84341

Hi again,
we sent a PR with the fix you suggested: https://github.com/LimeSurvey/LimeSurvey/pull/4730

c_schmitz

c_schmitz

2026-02-28 00:32

administrator   ~84343

Last edited: 2026-02-28 00:33

Sorry, the PR did not work.
I tested it without an explicit baseURL set, LimeSurvey being installed in a subfolder.

Related Changesets

LimeSurvey: master a0609a6b

2026-02-28 00:27

Philip Flohr

Committer: GitHub


Details Diff
Fixed issue 20410: File browser not working when LimeSurvey is installed in a subfolder Affected Issues
20410
mod - vendor/kcfinder/tpl/tpl_browser.php Diff File

Issue History

Date Modified Username Field Change
2026-01-22 09:19 DenisChenu New Issue
2026-01-22 09:19 DenisChenu File Added: with_baseUrl.png
2026-01-22 09:19 DenisChenu File Added: null_baseUrl.png
2026-01-22 09:20 DenisChenu Note Added: 84124
2026-01-22 09:20 DenisChenu Bug heat 0 => 2
2026-02-26 10:27 Bross Note Added: 84324
2026-02-26 10:27 Bross File Added: limesurvey-kcfinder.patch
2026-02-26 10:27 Bross Bug heat 2 => 4
2026-02-26 10:27 Bross Issue Monitored: Bross
2026-02-26 10:27 Bross Bug heat 4 => 6
2026-02-26 10:48 DenisChenu Note Added: 84325
2026-02-26 10:49 DenisChenu Note Added: 84326
2026-02-26 11:49 Bross Note Added: 84327
2026-02-27 12:15 Bross Note Added: 84341
2026-02-28 00:27 Changeset attached => LimeSurvey master a0609a6b
2026-02-28 00:27 guest Note Added: 84342
2026-02-28 00:27 guest Bug heat 6 => 8
2026-02-28 00:32 c_schmitz Note Deleted: 84342
2026-02-28 00:32 c_schmitz Bug heat 8 => 6
2026-02-28 00:32 c_schmitz Note Added: 84343
2026-02-28 00:32 c_schmitz Bug heat 6 => 8
2026-02-28 00:33 c_schmitz Note Edited: 84343