Relationship Graph

Relationship Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
13888Bug reports_ Unknownpublic2019-03-05 13:18
Reportercaseylucas Assigned ToDenisChenu  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version3.13.x 
Fixed in Version3.14.x 
Summary13888: unable to run db migration if using CRedisCache
Description

When performing a db migration via:

cd /var/www/html/
php application/commands/console.php updatedb

I received this msg:
CException: CRedisCache and its behaviors do not have a method or closure named "gc". in /var/www/html/framework/base/CComponent.php:266

This change fixes the bug:

--- a/base/application/helpers/update/updatedb_helper.php
+++ b/base/application/helpers/update/updatedb_helper.php
@@ -2319,7 +2319,10 @@ function db_upgrade_all($iOldDBVersion, $bSilent = false)
if (!(defined('YII_DEBUG') && YII_DEBUG)) {
Yii::app()->cache->flush();
// NB: CDummyCache does not have a gc method (used if debug > 0).

  • Yii::app()->cache->gc();
  • // CRedisCache does not have gc method. Verify method exists before calling.
  • if (method_exists(Yii::app()->cache, 'gc')) {
  • Yii::app()->cache->gc();
  • }
    }

    // Inform superadmin about update

Steps To Reproduce

Enable CRedisCache when performing a dbmigration. Note that a db migration must be needed.

Additional Information

See also: https://bugs.limesurvey.org/view.php?id=13744

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)3.13.2+180709
I will donate to the project if issue is resolvedNo
Browser
Database type & versionPostgres 349
Server OS (if known)linux
Webserver software & version (if known)FPM
PHP Version7.2

Relationships

related to 14596 closedDenisChenu CApcCache enabled gives error 500 when checking data integrity. 

Activities

DenisChenu

DenisChenu

2018-07-20 11:32

developer   ~48542

Last edited: 2018-07-20 11:32

Maybe

if (method_exists(Yii::app()->cache, 'flush')) {
    Yii::app()->cache->flush();
}
if (method_exists(Yii::app()->cache, 'gc')) {
    Yii::app()->cache->gc();
}

Directly ? Not only for DummyCache or with gs, but : test if the 2 methods exist for all cache :)

maybe you can make a pull request ?

caseylucas

caseylucas

2018-08-20 18:10

reporter   ~48830

PR: https://github.com/LimeSurvey/LimeSurvey/pull/1111

caseylucas

caseylucas

2018-09-13 17:55

reporter   ~49026

Is there any update on this issue? Anything I can do to help?

DenisChenu

DenisChenu

2018-09-14 09:05

developer   ~49032

Arg … make an error on number …
Merged

Related Changesets

LimeSurvey: master c0ef15f5

2018-09-14 09:03:41

Casey Lucas


Committer: user70560 Details Diff
Fixed issue 13982 : (partial) some existing Yii cacche can not be used

Dev: test existing method before use it.
Affected Issues
13888
mod - application/helpers/update/updatedb_helper.php Diff File

Issue History

Date Modified Username Field Change
2018-07-20 04:18 caseylucas New Issue
2018-07-20 04:19 caseylucas Issue Monitored: caseylucas
2018-07-20 11:32 DenisChenu Note Added: 48542
2018-07-20 11:32 DenisChenu Note Edited: 48542
2018-08-20 18:10 caseylucas Note Added: 48830
2018-09-13 17:55 caseylucas Note Added: 49026
2018-09-14 09:05 DenisChenu Note Added: 49032
2018-09-14 09:05 DenisChenu Assigned To => DenisChenu
2018-09-14 09:05 DenisChenu Status new => resolved
2018-09-14 09:05 DenisChenu Resolution open => fixed
2018-09-14 09:05 DenisChenu Fixed in Version => 3.14.x
2018-09-14 09:06 DenisChenu Changeset attached => LimeSurvey master c0ef15f5
2019-03-05 13:17 DenisChenu Relationship added related to 14596
2019-03-05 13:18 DenisChenu Status resolved => closed
2021-08-02 19:16 guest Bug heat 4 => 6