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).
 16
IDProjectCategoryView StatusLast Update
13503Bug reportsSurvey editingpublic2020-05-18 16:39
Reporterojehle Assigned Toc_schmitz  
PrioritynoneSeveritycrash 
Status closedResolutionreopened 
Product Version3.3.x 
Fixed 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.
Attached Files
survey-2.png (322,767 bytes)
survey-1.png (204,760 bytes)
Bug heat16
Complete LimeSurvey version number (& build) limesurvey3.5.3+180316.tar.gz
I will donate to the project if issue is resolvedNo
BrowserFirefox
Database type & 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

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   ~47292

2 screenshots

DenisChenu

DenisChenu

2018-03-30 09:37

developer   ~47293

Last edited: 2018-03-30 09:40

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

c_schmitz

c_schmitz

2020-03-15 09:08

administrator   ~56552

ojehle: Please update to the latest version and try again.
Let us know if you still have the issue Thank you.

ollehar

ollehar

2020-05-18 16:39

administrator   ~57885

This version of LimeSurvey is no longer supported. Please check so that the issue is fixed in a more recent version of LimeSurvey. If it's not, reopen this bug report. Thank you.

Issue History

Date Modified Username Field Change
2018-03-20 08:22 ojehle New Issue
2018-03-20 15:09 markusfluer Relationship added related to 13500
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
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-20 21:17 caseylucas Issue Monitored: caseylucas
2018-08-21 14:13 FCGad1946 Note Added: 48841
2018-10-29 10:46 ptramonti Issue Monitored: ptramonti
2019-11-01 17:25 c_schmitz Category Survey design => Survey editing
2020-03-15 09:08 c_schmitz Assigned To markusfluer => c_schmitz
2020-03-15 09:08 c_schmitz Status assigned => feedback
2020-03-15 09:08 c_schmitz Note Added: 56552
2020-05-18 16:39 ollehar Status feedback => closed
2020-05-18 16:39 ollehar Note Added: 57885
2021-08-03 04:09 guest Bug heat 12 => 16