View Issue Details

IDProjectCategoryView StatusLast Update
13503Bug reports[All Projects] Survey editingpublic2018-10-29 10:46
Reporterojehle Assigned Tomarkusfluer  
PrioritynoneSeverityblock 
Status assignedResolutionreopened 
Product Version3.3.x 
Target VersionFixed in Version3.6.x 
Summary13503: The Upload of Images not work. A popup occurs "No Permission" if you want to upload a picture to a survey
Description

With Version 2.x of Limesurvey it works. After installing a plain 3.5 from limesurvey3.5.3+180316.tar.gz, the upload of images is not working.

Steps To Reproduce

1) Installed Ubuntu 16.0.4.4 LTS in a VM. No other software exists. all php modules are php7.0, webserver apache.
2) Installed limesurvey3.5.3+180316.tar.gz i
3) created a new survey and saved it
4) try to upload a picture -> "Popup". no permission occurs.

Additional Information

We have a 2.x installation where we have no problems to upload. looks like that all version we tried until now with 3.x. the permission problem occured.

All Folders are owned by www-data (apache2 user) and have write permissions.

TagsNo tags attached.
Complete LimeSurvey version number (& build) limesurvey3.5.3+180316.tar.gz
I will donate to the project if issue is resolvedNo
BrowserFirefox
Database & DB-VersionMariadb
Server OS (if known)Ubuntu 16.0.4.4
Webserver software & version (if known)Apache2
PHP Versionphp7.0

Relationships

related to 13500 closedmarkusfluer Upload file in theme options is weird 

Activities

markusfluer

markusfluer

2018-03-20 14:13

administrator   ~47135

Please try to extend a theme and work in that.
We are currently working on a solution for the preshipped default themes.

ojehle

ojehle

2018-03-20 16:12

reporter   ~47141

but it was not only in the theme, it was in the survey when i upload a picture for a question for example.

markusfluer

markusfluer

2018-03-20 16:32

administrator   ~47143

Yes thats what i meant, please extend a theme in the theme editor, and then use that. That way you can upload stuff. In current master this should be fixed. Rollout should be close.

c_schmitz

c_schmitz

2018-03-28 12:14

administrator   ~47257

Version 3.6.0 released

ojehle

ojehle

2018-03-30 09:03

reporter   ~47291

i used the limesurvey3.6.1+180329.tar.gz

  • installed on the server (only copied the config.php file)
  • created a new survey
  • saved
  • choosed text elements
  • open the image chooser
  • press browse server -> get the error (i attached now 2 pics with the error)

This error occured 1st time with v3.

ojehle

ojehle

2018-03-30 09:04

reporter  

survey-2.png (322,767 bytes)
survey-1.png (204,760 bytes)
ojehle

ojehle

2018-03-30 09:04

reporter   ~47292

2 screenshots

DenisChenu

DenisChenu

2018-03-30 09:37

developer   ~47293

Last edited: 2018-03-30 09:40

View 2 revisions

I can't reproduce (with editor in popup or inline), directory is created when click on browse server.

Are you sure your webserver have the right to create directory on /upload/*/ directory.

ojehle

ojehle

2018-03-30 09:42

reporter   ~47294

yes.. the upload directory has owner www-data (apache) and write rights for the user apache

root@limetest:/var/www/html/limesurvey/upload# ls -ltar
total 28
drwxr-xr-x 15 www-data www-data 4096 Mar 29 14:39 ..
drwxr-xr-x 3 www-data www-data 4096 Mar 29 14:39 themes
drwxr-xr-x 2 www-data www-data 4096 Mar 29 14:39 surveys
-rwxr-xr-x 1 www-data www-data 128 Mar 29 14:39 readme.txt
drwxr-xr-x 2 www-data www-data 4096 Mar 29 14:39 labels
drwxr-xr-x 2 www-data www-data 4096 Mar 29 14:39 admintheme
drwxr-xr-x 6 www-data www-data 4096 Mar 29 14:39 .

markusfluer

markusfluer

2018-04-09 13:40

administrator   ~47370

This issue should be fixed with LS 3.6.2

ojehle

ojehle

2018-04-10 09:05

reporter   ~47375

still not working with limesurvey3.6.2+180406.tar.gz

i installed a fresh ubuntu, run the installer all works fine. but then created a survey and try to upload a picture in the editor. not working.

ojehle

ojehle

2018-04-30 13:26

reporter   ~47557

i fixed it now myself...

the problem was, that kcinit was not called correctly in the surveyadmin.php

attached a working solution....

+++ limesurvey/application/controllers/admin/surveyadmin.php 2018-04-30 13:21:08.796146142 +0200
@@ -1001,6 +1001,17 @@
}

 /**
    • reload initKc correctly
  • */

  • private function _callInitKcFinder($survey)

  • {

  • Yii::app()->loadHelper("admin/htmleditor");

  • Yii::app()->session['FileManagerContext'] = "edit:survey:{$survey->sid}";

  • initKcfinder();

  • }

  • /**

    • Edit surveytexts and general settings
      */
      public function surveygeneralsettings($iSurveyID)
      @@ -1024,7 +1035,7 @@
      //This method creates the text edition and the general settings
      $aData['panels'] = [];
  • Yii::app()->loadHelper("admin/htmleditor");

  • $this->_callInitKcFinder($survey);

     $aData['scripts'] = PrepareEditorScript(false, $this->getController());

@@ -1106,8 +1117,8 @@
$baselang = Survey::model()->findByPk($iSurveyID)->language;
array_unshift($grplangs, $baselang);

  • Yii::app()->loadHelper("admin/htmleditor");
  • $this->_callInitKcFinder($survey);
  •      $aData['scripts'] = PrepareEditorScript(false, $this->getController());
         $aTabTitles = $aTabContents = array();

@@ -1590,7 +1601,7 @@
*/
private function _getTextEditData($survey)
{

  • Yii::app()->loadHelper("admin/htmleditor");
  • $this->_callInitKcFinder($survey);
    $aData = $aTabTitles = $aTabContents = array();

     $aData['scripts'] = PrepareEditorScript(false, $this->getController());

    @@ -1778,9 +1789,7 @@
    $aData['noform'] = true;

     //KCFINDER SETTINGS
  • Yii::app()->session['FileManagerContext'] = "edit:survey:{$oSurvey->sid}";
  • Yii::app()->loadHelper('admin.htmleditor');
  • initKcfinder();
  • $this->_callInitKcFinder($survey);

     return $aData;


kcFinder.patch (1,983 bytes)
--- limesurvey.orginal/application/controllers/admin/surveyadmin.php	2018-04-24 15:04:14.000000000 +0200
+++ limesurvey/application/controllers/admin/surveyadmin.php	2018-04-30 13:21:08.796146142 +0200
@@ -1001,6 +1001,17 @@
     }
 
     /**
+     * reload initKc correctly
+     */
+
+    private function _callInitKcFinder($survey)
+    {
+ 	Yii::app()->loadHelper("admin/htmleditor");
+        Yii::app()->session['FileManagerContext'] = "edit:survey:{$survey->sid}";
+        initKcfinder();
+    }
+
+    /**
      * Edit surveytexts and general settings
      */
     public function surveygeneralsettings($iSurveyID)
@@ -1024,7 +1035,7 @@
         //This method creates the text edition and the general settings
         $aData['panels'] = [];
 
-        Yii::app()->loadHelper("admin/htmleditor");
+        $this->_callInitKcFinder($survey);
 
         $aData['scripts'] = PrepareEditorScript(false, $this->getController());
 
@@ -1106,8 +1117,8 @@
             $baselang = Survey::model()->findByPk($iSurveyID)->language;
             array_unshift($grplangs, $baselang);
 
-            Yii::app()->loadHelper("admin/htmleditor");
-
+            $this->_callInitKcFinder($survey);
+		
             $aData['scripts'] = PrepareEditorScript(false, $this->getController());
             $aTabTitles = $aTabContents = array();
 
@@ -1590,7 +1601,7 @@
      */
     private function _getTextEditData($survey)
     {
-        Yii::app()->loadHelper("admin/htmleditor");
+        $this->_callInitKcFinder($survey);
         $aData = $aTabTitles = $aTabContents = array();
 
         $aData['scripts'] = PrepareEditorScript(false, $this->getController());
@@ -1778,9 +1789,7 @@
         $aData['noform'] = true;
 
         //KCFINDER SETTINGS
-        Yii::app()->session['FileManagerContext'] = "edit:survey:{$oSurvey->sid}";
-        Yii::app()->loadHelper('admin.htmleditor');
-        initKcfinder();
+        $this->_callInitKcFinder($survey);
 
         return $aData;
     }
kcFinder.patch (1,983 bytes)
FCGad1946

FCGad1946

2018-08-21 14:13

reporter   ~48841

problem still in version 3.14.5

Issue History

Date Modified Username Field Change
2018-03-20 08:22 ojehle New Issue
2018-03-20 14:13 markusfluer Note Added: 47135
2018-03-20 15:09 markusfluer Relationship added related to 13500
2018-03-20 16:12 ojehle Note Added: 47141
2018-03-20 16:32 markusfluer Note Added: 47143
2018-03-20 16:32 markusfluer Assigned To => markusfluer
2018-03-20 16:32 markusfluer Status new => resolved
2018-03-20 16:32 markusfluer Resolution open => fixed
2018-03-20 16:32 markusfluer Fixed in Version => 3.5.x
2018-03-28 12:14 c_schmitz Note Added: 47257
2018-03-28 12:14 c_schmitz Status resolved => closed
2018-03-30 09:03 ojehle Status closed => feedback
2018-03-30 09:03 ojehle Resolution fixed => reopened
2018-03-30 09:03 ojehle Note Added: 47291
2018-03-30 09:04 ojehle File Added: survey-2.png
2018-03-30 09:04 ojehle File Added: survey-1.png
2018-03-30 09:04 ojehle Note Added: 47292
2018-03-30 09:04 ojehle Status feedback => assigned
2018-03-30 09:37 DenisChenu Note Added: 47293
2018-03-30 09:40 DenisChenu Note Edited: 47293 View Revisions
2018-03-30 09:42 ojehle Note Added: 47294
2018-04-09 13:40 markusfluer Note Added: 47370
2018-04-09 13:41 markusfluer Status assigned => resolved
2018-04-09 13:41 markusfluer Fixed in Version 3.5.x => 3.6.x
2018-04-10 09:05 ojehle Status resolved => feedback
2018-04-10 09:05 ojehle Note Added: 47375
2018-04-30 13:26 ojehle File Added: kcFinder.patch
2018-04-30 13:26 ojehle Note Added: 47557
2018-04-30 13:26 ojehle Status feedback => assigned
2018-08-21 14:13 FCGad1946 Note Added: 48841
2019-11-01 17:25 c_schmitz Category Survey design => Survey editing