View Issue Details

This bug affects 1 person(s).
 14
IDProjectCategoryView StatusLast Update
15740Bug reportsInstallationpublic2021-07-13 09:00
Reporterfabianlehner Assigned Toc_schmitz  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version4.0.0-RC14 
Fixed in Version5.x 
Summary15740: Update from 3.x.x to 4.0.0 fails if custom uploaddir is set
Description

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.
Bug heat14
Complete LimeSurvey version number (& build)4.0.0+200116
I will donate to the project if issue is resolvedNo
Browser
Database type & versionPostgres 10
Server OS (if known)
Webserver software & version (if known)
PHP Version7.4.1

Users monitoring this issue

DenisChenu

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

reporter   ~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

DenisChenu

DenisChenu

2021-07-13 09:00

developer   ~65412

Seems fix are reverted finally ?

Someone check if it work on last version ?

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-20 11:51 DenisChenu Issue Monitored: DenisChenu
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 Sync to Zoho Project => |Yes|
2021-02-04 10:21 cdorin Assigned To cdorin =>
2021-02-04 10:21 cdorin Sync to Zoho Project Yes => |Yes|
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
2021-07-13 08:31 c_schmitz Status feedback => resolved
2021-07-13 08:31 c_schmitz Fixed in Version => 5.x
2021-07-13 08:32 c_schmitz Status resolved => closed
2021-07-13 09:00 DenisChenu Note Added: 65412