View Issue Details

This bug affects 1 person(s).
 16
IDProjectCategoryView StatusLast Update
09615Bug reportsSurvey editingpublic2016-09-16 22:22
Reportergab79 Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.05+ 
Fixed in Version2.06+ 
Summary09615: KCFinder Image Browse Server not working when using db sessions
DescriptionIf sessions are stored in the DB, when using kcfinder for browsing survey resources or uploading images using the HTML editor we get the following error.

Cannot write to upload folder. /var/www/html/limesurvey/third_party/kcfinder

Steps To ReproduceConfigure sessions on DB using

  'session' => array (
     'class' => 'system.web.CDbHttpSession',
     'connectionID' => 'db',
     'sessionTableName' => '{{sessions}}',
   ),

Create a new survey.

Go to general settings/resources

Click on "Browse uploaded resources"

Additional InformationThis is the error page.

<html>
<body>
<script type='text/javascript'>
var kc_CKEditor = (window.parent && window.parent.CKEDITOR)
    ? window.parent.CKEDITOR.tools.callFunction
    : ((window.opener && window.opener.CKEDITOR)
        ? window.opener.CKEDITOR.tools.callFunction
        : false);
var kc_FCKeditor = (window.opener && window.opener.OnUploadCompleted)
    ? window.opener.OnUploadCompleted
    : ((window.parent && window.parent.OnUploadCompleted)
        ? window.parent.OnUploadCompleted
        : false);
var kc_Custom = (window.parent && window.parent.KCFinder)
    ? window.parent.KCFinder.callBack
    : ((window.opener && window.opener.KCFinder)
        ? window.opener.KCFinder.callBack
        : false);
if (kc_CKEditor)
    kc_CKEditor(0, '', 'Cannot write to upload folder. /var/www/html/limesurvey/third_party/kcfinder');
if (kc_FCKeditor)
    kc_FCKeditor(1, '', '', 'Cannot write to upload folder. /var/www/html/limesurvey/third_party/kcfinder');
if (kc_Custom) {
    if (76) alert('Cannot write to upload folder. /var/www/html/limesurvey/third_party/kcfinder');
    kc_Custom('');
}
if (!kc_CKEditor && !kc_FCKeditor && !kc_Custom)
    alert("Cannot write to upload folder. /var/www/html/limesurvey/third_party/kcfinder");
</script>
</body>
</html>
TagsNo tags attached.
Bug heat16
Complete LimeSurvey version number (& build)cd6d0efcf18f3d9e841dec2282e8
I will donate to the project if issue is resolvedNo
Browser
Database type & versionmysql-server 5.1
Server OS (if known)Centos 6.6
Webserver software & version (if known)Apache 2.2
PHP Version5.3.3

Relationships

related to 09523 new Development  SettingsWidget :renderHTML : do a choice and start to be used in LS core 
has duplicate 11663 closedDenisChenu Bug reports KCFinder Image Browse Server not working when using db sessions 

Users monitoring this issue

User List There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2015-04-28 10:13

developer   ~32068

https://manual.limesurvey.org/Project_ideas_for_GSoC_2015#Replace_current_CKEditor_usage_with_TinyMCE ;)
gab79

gab79

2015-04-29 18:49

reporter   ~32075

The problem seems to be related to how the sessions are stored (using files everything is fine) so maybe it could caused by something more general than the widget usage itself
DenisChenu

DenisChenu

2015-04-29 19:05

developer   ~32076

Hi,

Actally ckfinder use own session, and not LS core version :)
gab79

gab79

2015-04-29 19:36

reporter   ~32078

Yeah, you're perfectly right. KCfinder is completely unaware of Yii sessions. So inhtmleditor_helper.php we are writing int the sessions in the DB while in KCFinder we are reading using the default PHP session implementation.
gmambro

gmambro

2015-07-27 22:51

reporter   ~32819

Patch for using DB sessions https://github.com/LimeSurvey/LimeSurvey/pull/354
Mazi

Mazi

2015-07-30 14:02

partner   ~32840

Carsten, can you please check the pull request? Gabriele has provided helpful fixes in the past so I assume it should be well coded.

@Sam: Will LS3 already use a different editor or do you need a pull request for that version as well?
c_schmitz

c_schmitz

2015-07-31 11:08

administrator   ~32852

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

c_schmitz

2015-08-12 12:51

administrator   ~32917

Version 2.06+ Build 150812 released

Related Changesets

LimeSurvey: master 69b72585

2015-06-25 14:02:24

gab79

Details Diff
Fixed issue 09615: KCFinder Image Browse Server not working when using db sessions Affected Issues
09615
mod - third_party/kcfinder/core/bootstrap.php Diff File

LimeSurvey: master 71ec2ac4

2015-07-31 09:08:33

c_schmitz

Details Diff
Merge pull request #354 from gmambro/kcfinderpatch

Fixed issue 09615: KCFinder Image Browse Server not working when using db sessions
Affected Issues
09615
mod - third_party/kcfinder/core/bootstrap.php Diff File

Issue History

Date Modified Username Field Change
2015-04-23 17:20 gab79 New Issue
2015-04-27 12:47 Mazi Assigned To => c_schmitz
2015-04-27 12:47 Mazi Status new => assigned
2015-04-28 10:13 DenisChenu Note Added: 32068
2015-04-28 10:14 DenisChenu Relationship added related to 09523
2015-04-29 18:49 gab79 Note Added: 32075
2015-04-29 19:05 DenisChenu Note Added: 32076
2015-04-29 19:36 gab79 Note Added: 32078
2015-07-27 22:51 gmambro Note Added: 32819
2015-07-30 14:01 Mazi Issue Monitored: sammousa
2015-07-30 14:02 Mazi Note Added: 32840
2015-07-31 11:08 gab79 Changeset attached => LimeSurvey master 69b72585
2015-07-31 11:08 c_schmitz Changeset attached => LimeSurvey master 71ec2ac4
2015-07-31 11:08 c_schmitz Note Added: 32852
2015-07-31 11:08 c_schmitz Resolution open => fixed
2015-07-31 12:47 c_schmitz Status assigned => resolved
2015-07-31 12:47 c_schmitz Fixed in Version => 2.06+
2015-08-12 12:51 c_schmitz Note Added: 32917
2015-08-12 12:51 c_schmitz Status resolved => closed
2016-09-16 22:22 DenisChenu Relationship added has duplicate 11663
2019-11-01 17:25 c_schmitz Category Survey design => Survey editing