View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
11618Bug reportsSurvey editingpublic2016-09-07 13:03
Reportervkuzmin Assigned Toc_schmitz  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version2.51.x 
Summary11618: KCFinder dont work properly
Description

Every button cause errors like "unable to open kcact:upload"

I think that he need jquery to work. I've had same error in 2.50

Steps To Reproduce

Try to upload some images

TagsNo tags attached.
Bug heat8
Complete LimeSurvey version number (& build)b1c10d5d9f5f4f0e482c071bce787aee3864bdad
I will donate to the project if issue is resolvedNo
BrowserFirefox, Chrome
Database type & versionmysqlnd 5.0.10 - 20111026
Server OS (if known)Windows 10
Webserver software & version (if known)Apache/2.4.6 (Win32)
PHP VersionPHP/5.6.24

Relationships

duplicate of 09118 closedc_schmitz KCFinder Image Browse Server not working due to incorrect cookieDomain 

Users monitoring this issue

There are no users monitoring this issue.

Activities

vkuzmin

vkuzmin

2016-09-02 14:30

reporter   ~40663

Last edited: 2016-09-02 14:37

part of <head>:

<script src="js/index.php" type="text/javascript"></script>
<script src="jslocalize.php?lng=en" type="text/javascript"></script>
<script src="themes/default/js.php" type="text/javascript"></script>
<script type="text/javascript">
.version = "3.12";
.support.zip = true;
.support.check4Update = true;
.lang = "en";
.type = "images";
.theme = "default";
.access = {"files":{"upload":true,"delete":true,"copy":true,"move":true,"rename":true},"dirs":{"create":true,"delete":true,"rename":true}};
.dir = "images";
.uploadURL = "/limesurvey/upload/surveys/353449";
.thumbsURL = .uploadURL + "/.thumbs";
.opener = {"name":"ckeditor","CKEditor":{"funcNum":"1"}};
.cms = "";
_.csrftoken = "c46ae98a25e1a9b572b5da33d4296b2095c9302a3075240eff717346074ec5cea784d32221a5362916fb5c370d4e54b7794cca2f1f25833ca0b7befcbba963ec";
$.ajaxSetup({data: {kcfindercsrftoken: .csrftoken}});
$.$.kuki.domain = "192.168.100.148:8081";
$.$.kuki.path = "/";
$.$.kuki.prefix = "KCFINDER";
$(function() {
.resize(); .init(); });
$(window).resize(
.resize);
</script>

As you can see he tried to use $ but dont load jquery-2.2.4.min.js.
Firebug Console:
TypeError: $(...).get(...) is undefined
$('#order input[value="' + $.$.kuki.get('order') + '"]').get(0).checked = true;

ollehar

ollehar

2016-09-02 15:14

administrator   ~40666

Upload image where? Cannot reproduce when uploading image in question description.

vkuzmin

vkuzmin

2016-09-02 15:42

reporter   ~40670

Last edited: 2016-09-02 15:42

It dont work in survey general settings, questions, everywhere.
In chrome's console kcfinder cause "index.php:2712 Uncaught TypeError: Cannot set property 'checked' of undefined" error.
index.php:2712 contain $('#order input[value="' + $.$.kuki.get('order') + '"]').get(0).checked = true;

c_schmitz

c_schmitz

2016-09-02 16:28

administrator   ~40671

I can't reproduce either - we also did not do any changes regarding ckeditor recently.

DenisChenu

DenisChenu

2016-09-03 12:31

developer   ~40673

When we update to kcfinder/ckeditor : we add a delete files in kcfinder cache. Maybe this was not happen in your installtion

I think it was this one : https://github.com/LimeSurvey/LimeSurvey/commit/3c0535cd534ed47dd89943299e517dcbad0add7f

vkuzmin

vkuzmin

2016-09-05 13:10

reporter   ~40681

jquerry is loaded in my kcfinder instance, i was wrong. Looks like kcfinder cannot check his options. for example, $.$.kuki.get('order') is null instead of "name", but
$('#order input[value="name"]').get(0); works (<input id="sortName" class="sh-uniform" type="radio" value="name" name="sort">)
$('#order input[value="name"]').get(0).checked is false by default instead of true.

I tried already to clear browser's cache and cookies.

ollehar

ollehar

2016-09-05 14:11

administrator   ~40682

What's mysqlnd 5.0.10? LimeSurvey needs MySQL 5.5.3 or later.

vkuzmin

vkuzmin

2016-09-05 14:15

reporter   ~40683

Ok. i'l update tomorrow

vkuzmin

vkuzmin

2016-09-06 10:15

reporter   ~40690

Last edited: 2016-09-07 09:52

Looks like uncommon mysql and apache ports cause that problem.

I've found solution (https://www.couchcms.com/forum/viewtopic.php?f=4&amp;t=8298):

  1. Go to limesurvey\third_party\kcfinder\conf\config.php
  2. Find the line 'cookieDomain' => ""
  3. Write here address WITHOUT port, i.e. 'cookieDomain' => "www.yoursite.com"

So i chaged <b>cookieDomain (line 104)</b> in <b>limesurvey\third_party\kcfinder\conf\config.php</b> from "", to
<b>'cookieDomain' => $_SERVER['SERVER_NAME'],</b>
and now it works fine. But i dont think that it should be modified on the repository.

UPD: Updated mysql from 5.6.13 to 5.7.14 (phpinfo still show mysqlnd 5.0.10 - 20111026 but SELECT @@version; show 5.7.14). I've realized that kcfinder dont work with non english symbols in file names. in other cases
'cookieDomain' => $_SERVER['SERVER_NAME'],
can help but more safe to write real domain name in quotes.
This issue can be closed becouse its 100% kcfinder bug anyway.

c_schmitz

c_schmitz

2016-09-07 13:03

administrator   ~40713

You can enforce this by setting an explicit cookie URL - see https://manual.limesurvey.org/Optional_settings#Request_settings

Issue History

Date Modified Username Field Change
2016-09-02 14:30 vkuzmin New Issue
2016-09-02 14:30 vkuzmin Note Added: 40663
2016-09-02 14:31 vkuzmin Note Edited: 40663
2016-09-02 14:32 vkuzmin Note Edited: 40663
2016-09-02 14:33 vkuzmin Note Edited: 40663
2016-09-02 14:34 vkuzmin Note Edited: 40663
2016-09-02 14:37 vkuzmin Note Edited: 40663
2016-09-02 15:14 ollehar Note Added: 40666
2016-09-02 15:42 vkuzmin Note Added: 40670
2016-09-02 15:42 vkuzmin Note Edited: 40670
2016-09-02 16:28 c_schmitz Note Added: 40671
2016-09-03 12:31 DenisChenu Note Added: 40673
2016-09-05 13:10 vkuzmin Note Added: 40681
2016-09-05 14:11 ollehar Note Added: 40682
2016-09-05 14:15 vkuzmin Note Added: 40683
2016-09-06 10:15 vkuzmin Note Added: 40690
2016-09-06 10:19 vkuzmin Note Edited: 40690
2016-09-06 10:21 vkuzmin Note Edited: 40690
2016-09-07 09:49 vkuzmin Note Edited: 40690
2016-09-07 09:50 vkuzmin Note Edited: 40690
2016-09-07 09:51 vkuzmin Note Edited: 40690
2016-09-07 09:52 vkuzmin Note Edited: 40690
2016-09-07 13:03 c_schmitz Note Added: 40713
2016-09-07 13:03 c_schmitz Status new => closed
2016-09-07 13:03 c_schmitz Assigned To => c_schmitz
2016-09-07 13:03 c_schmitz Resolution open => fixed
2016-09-07 13:03 c_schmitz Relationship added duplicate of 09118
2019-11-01 17:25 c_schmitz Category Survey design => Survey editing