View Issue Details

This issue affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
20410Bug reportsSurvey editingpublic2026-09-21 11:30
ReporterDenisChenu Assigned Toc_schmitz  
PrioritynoneSeverityminor 
Status acknowledgedResolutionopen 
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 heat10
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.

tibor.pacalat

tibor.pacalat

2026-09-10 17:47

administrator   ~85654

@DenisChenu are you on this or should I reassign?

DenisChenu

DenisChenu

2026-09-10 18:12

developer   ~85656

No,
I look at it on my broken server

It's OK

DenisChenu

DenisChenu

2026-09-21 11:10

developer   ~85872

Current situation :
OK on editor/image/browser server
Not OK on browsing resources (on this server)

DenisChenu

DenisChenu

2026-09-21 11:14

developer   ~85873

Think it's due to some security about iframe ????

DenisChenu

DenisChenu

2026-09-21 11:23

developer   ~85874

Last edited: 2026-09-21 11:24

Strange issue here, see the screen updated

OK with chrome, not OK with Firefox (currently)

DenisChenu

DenisChenu

2026-09-21 11:30

developer   ~85875

I don't find where is the issue here :(

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
2026-09-05 16:23 c_schmitz Status new => ready for code review
2026-09-05 16:23 c_schmitz Story point estimate => 0
2026-09-05 16:23 c_schmitz Assigned To => DenisChenu
2026-09-10 17:47 tibor.pacalat Note Added: 85654
2026-09-10 17:47 tibor.pacalat Bug heat 8 => 10
2026-09-10 18:12 DenisChenu Note Added: 85656
2026-09-21 11:10 DenisChenu Note Added: 85872
2026-09-21 11:10 DenisChenu File Added: Capture d’écran du 2026-09-21 11-09-44.png
2026-09-21 11:10 DenisChenu File Added: Capture d’écran du 2026-09-21 11-10-09.png
2026-09-21 11:14 DenisChenu Note Added: 85873
2026-09-21 11:23 DenisChenu Note Added: 85874
2026-09-21 11:23 DenisChenu File Added: Capture vidéo du 2026-09-21 11-21-36.mp4
2026-09-21 11:24 DenisChenu Note Edited: 85874
2026-09-21 11:30 DenisChenu Assigned To DenisChenu => c_schmitz
2026-09-21 11:30 DenisChenu Status ready for code review => acknowledged
2026-09-21 11:30 DenisChenu Note Added: 85875