View Issue Details

IDProjectCategoryView StatusLast Update
15740Bug reportsInstallationpublic2021-04-22 16:59
Reporterfabianlehner Assigned Toc_schmitz  
PrioritynormalSeveritypartial_block 
Status feedbackResolutionfixed 
Product Version4.0.0-RC14 
Summary15740: Update from 3.x.x to 4.0.0 fails if custom uploaddir is set
DescriptionIn 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 ReproduceUpgrade 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
Browser
Database & DB-VersionPostgres 10
Server OS (if known)
Webserver software & version (if known)
PHP Version7.4.1

Activities

ollehar

ollehar

2020-01-20 10:38

administrator   ~55375

Known issue. Thanks for reporting.
fabianlehner

fabianlehner

2020-01-20 10:44

reporter   ~55376

Last edited: 2021-02-04 10:21

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

gabrieljenik

2020-07-16 22:32

manager   ~58980

Last edited: 2021-02-04 10:21

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).

Comments?
cdorin

cdorin

2020-07-29 14:47

manager   ~59154

Last edited: 2021-02-04 10:21

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

DenisChenu

2020-07-29 14:51

developer   ~59155

Last edited: 2021-02-04 10:21

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

ollehar

2021-03-03 14:25

administrator   ~62643

Please check if this bug still exists in the latest patch release. Thank you.

I could not reproduce this.
c_schmitz

c_schmitz

2021-03-29 14:31

administrator   ~63704

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

c_schmitz

2021-03-29 14:31

administrator   ~63705

Wouldn't the fix just be http://bugs.limesurvey.org/plugin.php?page=Source/view&id=31426 ?
gabrieljenik

gabrieljenik

2021-04-07 19:29

manager   ~63862

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

Related Changesets

LimeSurvey: master dd0977b0

2021-03-29 14:31:18

c_schmitz

Details Diff
Fixed issue 15740: Update from 3.x.x to 4.0.0 fails if custom uploaddir is set Affected Issues
15740
mod - application/config/config-defaults.php Diff File

LimeSurvey: master 835f10bc

2021-04-07 19:29:07

gabrieljenik

Details Diff
Revert "Fixed issue 15740: Update from 3.x.x to 4.0.0 fails if custom uploaddir is set"

This reverts commit dd0977b0e1988ca1e6d861d74402f23b70b367fc.
Reverted after speaking discussing with Carsten
Affected Issues
15740
mod - application/config/config-defaults.php Diff File

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-04-02 20:21 cdorin Zoho Sprints => |Yes|
2020-04-02 20:21 swendrich Zoho Sprints ID => 14469000000024013
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 Zoho Sprints Yes => |Yes|
2020-07-29 14:47 cdorin Note Added: 59154
2020-07-29 14:51 DenisChenu Note Added: 59155
2021-02-04 10:15 cdorin Status acknowledged => new
2021-02-04 10:21 cdorin Priority low => normal
2021-02-04 10:21 cdorin Status new => confirmed
2021-02-04 10:21 cdorin Assigned To cdorin =>
2021-03-03 14:25 ollehar Assigned To => ollehar
2021-03-03 14:25 ollehar Status confirmed => feedback
2021-03-03 14:25 ollehar Note Added: 62643
2021-03-29 14:31 c_schmitz Changeset attached => LimeSurvey master dd0977b0
2021-03-29 14:31 c_schmitz Note Added: 63704
2021-03-29 14:31 c_schmitz Assigned To ollehar => c_schmitz
2021-03-29 14:31 c_schmitz Resolution open => fixed
2021-03-29 14:31 c_schmitz Note Added: 63705
2021-04-07 19:29 gabrieljenik Changeset attached => LimeSurvey master 835f10bc
2021-04-07 19:29 gabrieljenik Note Added: 63862
2021-04-07 19:29 gabrieljenik Assigned To c_schmitz => gabrieljenik
2021-04-22 16:59 gabrieljenik Assigned To gabrieljenik => c_schmitz