View Issue Details

This issue affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
20392Bug reportsUsability/user experiencepublic2026-07-29 16:30
ReporterHansemanMUC Assigned ToDenisChenu  
PrioritynoneSeveritypartial_block 
Status resolvedResolutionfixed 
Product Version6.12.x 
Summary20392: URL placeholders such as {SURVEYURL} are expanded to invalid URLs
Description

In my LimeSurvey installation (6.16.2), when I create surveys, the URLs linking to the survey are wrong.
I have seen this in several places:

  • Emails
  • Link to the survey in the UI
  • QR codes

For example, if my limesurvey-site is limesurvey.example.com, the links look like this:

https://limesurvey.example.comhttps://limesurvey.example.com/index.php/xxyyzz?lang=de-informal

After removing the first part (https://limesurvey.example.com), the link works. However, when sending out Emails or giving away QR codes, this prevents users from taking the survey.

Details for my installation:

  • docker based installation (using martialblog/limesurvey:6-apache from 2025-12-26)
  • traefik is used as a reverse proxy

config.php:

<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
return array(
  'components' => array(
    'db' => array(
      'connectionString' => 'mysql:host=lime-db;port=3306;dbname=limesurvey;',
      'emulatePrepare' => true,
      'username' => 'limesurvey',
      'password' => 'xxxxxxxxxf',
      'charset' => 'utf8mb4',
      'tablePrefix' => 'lime_',
    ),
    //'session' => array (
    //   'class' => 'application.core.web.DbHttpSession',
    //   'connectionID' => 'db',
    //   'sessionTableName' => '{{sessions}}',
    //),
    'urlManager' => array(
      'urlFormat' => 'path',
      'rules' => array(),
      'showScriptName' => true,
    ),
    'request' => array(
      'baseUrl' => 'https://limesurvey.example.com',
     ),
  ),
  'config'=>array(
    'publicurl'=>'https://limesurvey.example.com',
    'debug'=>0,
    'debugsql'=>0,
    'mysqlEngine' => 'MyISAM',
  )
);
Steps To Reproduce

Steps to reproduce

Create a survey, add participants, send invite email

Expected result

correct URL in the email or in the QR code generated by UI:
https://limesurvey.example.com/index.php/xxyyzz?lang=de-informal

Actual result

actual URL:
https://limesurvey.example.comhttps://limesurvey.example.com/index.php/xxyyzz?lang=de-informal

TagsNo tags attached.
Attached Files
Bug heat2
Complete LimeSurvey version number (& build)LimeSurvey Community Edition Version 6.16.2 (martialblog/limesurvey:6-apache)
I will donate to the project if issue is resolvedNo
Story point estimate
BrowserFirefox and Chrome
Database type & versionmysql 5.7 (docker.io/mysql:5.7)
Server OS (if known)Linux
Webserver software & version (if known)Apache (2.4.65-1~deb12u1)
PHP VersionPHP 8.3.28 (cli) (built: Dec 8 2025 22:57:17) (NTS)

Relationships

related to 20059 assignedgabrieljenik createAbsoluteUrl don't use publicurl 

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2025-12-31 11:58

developer   ~84053

Why you use both ?

Use only publicurl OR baseUrl

Only one is needed.
It still an issue , but really minor.

DenisChenu

DenisChenu

2026-07-22 10:02

developer   ~85239

Last edited: 2026-07-22 10:04

PS : using

    'request' => array(
      'baseUrl' => 'https://limesurvey.example.com',
     ),

is broken with YII : you must use

    'request' => array(
      'hostInfo' => 'https://limesurvey.example.com',
     ),

And can have

    'request' => array(
'baseUrl' => '/limesurvey',
      'hostInfo' => 'https://www.example.com',
     ),

See : https://www.yiiframework.com/doc/api/1.1/CHttpRequest#baseUrl-detail

Returns the relative URL for the application.

DenisChenu

DenisChenu

2026-07-22 10:13

developer   ~85241

https://github.com/LimeSurvey/LimeSurvey/pull/5159

DenisChenu

DenisChenu

2026-07-22 11:20

developer   ~85246

OK, we have the issue too with 'baseUrl' => '/limesurvey',

I fix for tghis

DenisChenu

DenisChenu

2026-07-23 17:39

developer   ~85264

On this one : I review totally all URL management tests too.

DenisChenu

DenisChenu

2026-07-29 16:30

developer   ~85281

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

Related Changesets

LimeSurvey: master 3b6cf7df

2026-07-29 16:30

DenisChenu

Committer: GitHub


Details Diff
Fixed issue 20392: Invalid URL placeholders when using hostInfo or baseUrl and publicurl (05159) Affected Issues
20392
mod - application/core/Traits/LSApplicationTrait.php Diff File
mod - phpunit.xml Diff File
mod - tests/TestHelper.php Diff File
mod - tests/unit/LSYiiApplicationTest.php Diff File
mod - tests/unit/models/SurveyTest.php Diff File

Issue History

Date Modified Username Field Change
2025-12-28 13:22 HansemanMUC New Issue
2025-12-28 13:22 HansemanMUC File Added: survey_archive_197329.lsa
2025-12-31 11:58 DenisChenu Note Added: 84053
2025-12-31 11:58 DenisChenu Bug heat 0 => 2
2026-01-05 13:37 tibor.pacalat Assigned To => DenisChenu
2026-01-05 13:37 tibor.pacalat Status new => assigned
2026-01-09 12:36 DenisChenu Relationship added related to 20059
2026-07-22 10:02 DenisChenu Note Added: 85239
2026-07-22 10:04 DenisChenu Note Edited: 85239
2026-07-22 10:13 DenisChenu Note Added: 85241
2026-07-22 11:20 DenisChenu Note Added: 85246
2026-07-23 17:39 DenisChenu Status assigned => ready for code review
2026-07-23 17:39 DenisChenu Note Added: 85264
2026-07-24 09:13 DenisChenu Assigned To DenisChenu => gabrieljenik
2026-07-28 18:45 gabrieljenik Assigned To gabrieljenik => tibor.pacalat
2026-07-28 18:45 gabrieljenik Status ready for code review => ready for testing
2026-07-29 16:30 DenisChenu Changeset attached => LimeSurvey master 3b6cf7df
2026-07-29 16:30 DenisChenu Note Added: 85281
2026-07-29 16:30 DenisChenu Assigned To tibor.pacalat => DenisChenu
2026-07-29 16:30 DenisChenu Status ready for testing => resolved
2026-07-29 16:30 DenisChenu Resolution open => fixed