View Issue Details

This bug affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
16176Bug reportsOtherpublic2021-09-06 10:59
Reporterbismark Assigned Toollehar  
PrioritynoneSeverityblock 
Status closedResolutionfixed 
Product Version3.22.14 
Summary16176: when preloading PluginManager KCFinder crashes
Description

in application/config/config.php I added the following line before
'components': 'preload' => array('pluginManager'),

see preload here: https://www.yiiframework.com/doc/api/1.1/CModule#preload-detail

now KCFinder is not working (see Survey -> Ressources)
to solve this temporarily, I did the following:

  • third_party/kcfinder/conf/config.php ca Line 24
  • changed 'disabled' => true, to 'disabled' => false,
  • third_party/kcfinder/core/bootstrap.php ca Line 124
  • changed checkLSSession(); to //checkLSSession();

the KCFinder is now working, but under which sideeffects?

TagsNo tags attached.
Bug heat10
Complete LimeSurvey version number (& build)3.xLTS
I will donate to the project if issue is resolvedNo
Browser
Database type & version10.1.26-MariaDB
Server OS (if known)
Webserver software & version (if known)
PHP Version7.3.15

Users monitoring this issue

There are no users monitoring this issue.

Activities

ollehar

ollehar

2020-04-23 10:56

administrator   ~57332

What's the use-case for preloading PluginManager?

bismark

bismark

2020-04-23 11:01

reporter   ~57333

https://github.com/mbischof/LimeSurvey/issues/3

ollehar

ollehar

2020-04-23 11:50

administrator   ~57336

OK, did you ask Louis about this? He's the module guy. :)

DenisChenu

DenisChenu

2020-04-23 12:25

developer   ~57338

Maybe find why PluginManager have something related to Session ?

But here : seems preload PluginManager force to load it in kcfinder …

Else checkLSSession to use LS session : DB , specific system etc … if you don't have specific installation : i doin't think there are issue (we live with default PHP session during year).
See Git history (on 2.6lts)
https://github.com/SondagesPro/LimeSurvey-SondagesPro/commits/2.06_SondagesPro/third_party/kcfinder

Mazi

Mazi

2020-04-23 16:47

updater   ~57343

How could a better module support for the future look like? Would a new global setting under "security" make sense? Something like "Allow loading custom modules" which then provides the necessary integration/interfaces if enabled?

ollehar

ollehar

2021-03-03 15:28

administrator   ~62670

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

bismark

bismark

2021-06-01 14:47

reporter   ~64686

current 3.x-LTS

Internal Server Error
Class 'Twig_Environment' not found

ollehar

ollehar

2021-06-01 14:51

administrator   ~64687

Yeah, you must preload the Twig extension first. Check preload config in config-internal (I think).

Mazi

Mazi

2021-06-01 19:41

updater   ~64694

@ollehar, has that behavior changed? Is that a new requirement?

ollehar

ollehar

2021-06-01 19:44

administrator   ~64695

has that behavior changed? Is that a new requirement?

Yes, yiiext is now preloaded. It's not namespaced, so it has to manually be loaded.

This is the internal config:

'preload' => array('log', 'ETwigViewRenderer'),

internal.php

ollehar

ollehar

2021-06-01 19:46

administrator   ~64696

What's the use-case for preloading the plugin manager?

bismark

bismark

2021-07-13 10:40

reporter   ~65416

I wanted to register a yii-module within a plugin. That is only possible very early in the life cycle of page processing. So I tried different things.

  • afterPluginLoad-Event is too late, except you are preloading the pluginManager
  • defining a new event 'onBeginRequest' and subscribing to that event

application/config/config.php

'onBeginRequest' => function($event) {
    $event = new PluginEvent('onBeginRequest');
    Yii::app()->getPluginManager()->dispatchEvent($event);
},
DenisChenu

DenisChenu

2021-07-13 10:51

developer   ~65417

  • defining a new event 'onBeginRequest' and subscribing to that event

beforeControllerAction happen after PluginLoad event ?

Else: i like the idea to have a very early event , nothing before ?
how a plugin can register an event if its' not in loaded ?
maybe put afterPluginLoad before ?

ollehar

ollehar

2021-07-21 17:00

administrator   ~65546

Still an issue?

galads

galads

2021-08-30 14:14

reporter   ~66184

Hello bismark,
I checked this with the latest version and could not reproduce it, so this is most likely fixed for good.
Therefore, I am closing this issue. If you still can reproduce the issue using the latest version, please feel free to re-open the issue.
Thank you!

galads

Mazi

Mazi

2021-08-30 15:39

updater   ~66199

@bismark, can you please double check if this issue is fixed?!

Issue History

Date Modified Username Field Change
2020-04-23 10:53 bismark New Issue
2020-04-23 10:56 ollehar Note Added: 57332
2020-04-23 11:01 bismark Note Added: 57333
2020-04-23 11:50 ollehar Note Added: 57336
2020-04-23 12:25 DenisChenu Note Added: 57338
2020-04-23 16:47 Mazi Note Added: 57343
2021-03-03 15:28 ollehar Assigned To => ollehar
2021-03-03 15:28 ollehar Status new => feedback
2021-03-03 15:28 ollehar Note Added: 62670
2021-06-01 14:47 bismark Note Added: 64686
2021-06-01 14:47 bismark Status feedback => assigned
2021-06-01 14:51 ollehar Note Added: 64687
2021-06-01 19:41 Mazi Note Added: 64694
2021-06-01 19:44 ollehar Note Added: 64695
2021-06-01 19:46 ollehar Note Added: 64696
2021-06-01 19:46 ollehar Status assigned => feedback
2021-07-13 10:40 bismark Note Added: 65416
2021-07-13 10:40 bismark Status feedback => assigned
2021-07-13 10:51 DenisChenu Note Added: 65417
2021-07-21 17:00 ollehar Status assigned => feedback
2021-07-21 17:00 ollehar Note Added: 65546
2021-08-30 14:14 galads Note Added: 66184
2021-08-30 14:14 galads Bug heat 8 => 10
2021-08-30 14:14 galads Status feedback => resolved
2021-08-30 14:14 galads Resolution open => fixed
2021-08-30 15:39 Mazi Note Added: 66199
2021-09-06 10:59 c_schmitz Status resolved => closed