View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
20059Bug reportsPluginspublic2025-04-14 16:20
ReporterDenisChenu Assigned To 
PrioritynoneSeverityminor 
Status newResolutionopen 
Product Version6.6.x 
Summary20059: createAbsoluteUrl don't use publicurl
Description

Using createAbsoluteUrl in plugin are broken even when set publicurl

Steps To Reproduce

Steps to reproduce

Import and activate included plugins
Set publicurl = 'https://example.org' in config.php
Launch php application/commands/console.php plugin index --target=checkCommandUrl
Launch php application/commands/console.php plugin index --target=checkCommandUrlSetHost

Expected result

have valid url in both plugins

Actual result

have invalid url in both plugins

  • with checkCommandUrl SURVEYURL is OK, but not OPTOUTURL
  • with checkCommandUrlSetHost OPTOUTURL is OK, but not SURVEYURL
TagsNo tags attached.
Attached Files
checkCommandUrl.zip (1,505 bytes)
Bug heat2
Complete LimeSurvey version number (& build)6.12.4
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP VersionPHP8.2

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2025-04-14 16:20

developer   ~82425

Real result

$ php8.2 application/commands/console.php plugin index --target=checkCommandUrl
http://application/commands/console.php?r=survey/index&surveyid=123
http://application/commands/console.php?r=optout/tokens&surveyid=&token=abcd
https://example.org/console.php?r=survey/index&sid=489424&lang=en
$ php8.2 application/commands/console.php plugin index --target=checkCommandUrlSetHost
http://limesurtvey.example.com/subdirectory?r=survey/index&surveyid=123
http://limesurtvey.example.com/subdirectory?r=optout/tokens&surveyid=123&token=abcd
https://example.orghttp://limesurtvey.example.com/subdirectory?r=survey/index&sid=489424&lang=en

I don't have opinion if checkCommandUrlSetHost must use publicurl or not.

For checkCommandUrl : broken without error_reporting(0);
PHP Error[2]: Undefined array key "SERVER_NAME"
Must be avoided too

Issue History

Date Modified Username Field Change
2025-04-14 16:17 DenisChenu New Issue
2025-04-14 16:17 DenisChenu File Added: checkCommandUrl.zip
2025-04-14 16:17 DenisChenu File Added: checkCommandUrlSetHost.zip
2025-04-14 16:20 DenisChenu Note Added: 82425
2025-04-14 16:20 DenisChenu Bug heat 0 => 2