View Issue Details

IDProjectCategoryView StatusLast Update
15740Bug reportsInstallationpublic2020-07-29 14:51
Reporterfabianlehner Assigned Tocdorin  
Status acknowledgedResolutionopen 
Product Version4.0.0-RC14 
Summary15740: Update from 3.x.x to 4.0.0 fails if custom uploaddir is set

In config-default.php, the newly introduced userquestionthemerootdir config doesn't extend the uploaddir setting, but hard-codes a relative path starting with "upload". This makes the database upgrade fail if a custom uploaddir is set, unless the userquestionthemerootdir is also manually set.

Steps To Reproduce

Upgrade a LS installation with custom uploaddir from 3.x.x to 4.0.0.

TagsNo tags attached.
Complete LimeSurvey version number (& build)4.0.0+200116
I will donate to the project if issue is resolvedNo
Database & DB-VersionPostgres 10
Server OS (if known)
Webserver software & version (if known)
PHP Version7.4.1




2020-01-20 10:38

administrator   ~55375

Known issue. Thanks for reporting.



2020-01-20 10:44

reporter   ~55376

Last edited: 2020-04-02 20:21

Thanks! I couldn't find any related issues, that's why I reported it.



2020-07-16 22:32

developer   ~58980

From what I see the issue is as follows:

  • Some config items on config-defaults depends from each other.
    userquestionthemerootdir depens from uploaddir.
  • If the uploaddir is redefined on config, userquestionthemerootdir is not recalculated.

As to fix this my suggestion is:

  • Organize items in config-defaults in between "basic" and "derived".
  • The "derived" ones should be enclosed on a function calcDerivedConfig().
  • That function should be called once on config-defaults.php as to initialize the items (in case some script includes config-defaults.php directly - we don't want to break anything)
  • Then would also be called on config.php right before returning the config array. This call would have the objective of making sure the derived config items are properly calculated after a basic config -item from config-defaults.php is overriden on config.php

We could add the function on config.php as to be called optionally (uncomment manually).




2020-07-29 14:47

manager   ~59154

Moving to acknowledged - many other things need to be done first. Thanks for update, Gabriel!



2020-07-29 14:51

developer   ~59155

And if you set a derived config : calcDerivedConfig must not update it … then need to load config 2 times ?

Issue History

Date Modified Username Field Change
2020-01-20 10:13 fabianlehner New Issue
2020-01-20 10:38 ollehar Note Added: 55375
2020-01-20 10:44 fabianlehner Note Added: 55376
2020-01-22 16:07 cdorin Assigned To => cdorin
2020-01-22 16:07 cdorin Status new => assigned
2020-07-16 22:32 gabrieljenik Note Added: 58980
2020-07-29 14:47 cdorin Priority none => low
2020-07-29 14:47 cdorin Status assigned => acknowledged
2020-07-29 14:47 cdorin Note Added: 59154
2020-07-29 14:51 DenisChenu Note Added: 59155