Relationship Graph
View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
06414 | Bug reports | Survey editing | public | 2012-08-01 10:48 | 2012-08-16 10:23 |
Reporter | sammousa | Assigned To | c_schmitz | ||
Priority | normal | Severity | partial_block | ||
Status | closed | Resolution | fixed | ||
Product Version | 2.00RC7 | ||||
Target Version | 2.00RC9 | Fixed in Version | 2.00RC9 | ||
Summary | 06414: Can't upload image during survey design. | ||||
Description | Can't upload image during survey design. (Part of the) problem is in ./application/controllers/admin/kcfinder.php The index function checks for file existence, the paths used however are incomplete (ie. it uses a relative path that starts with / making it absolute and thus the file is not found). | ||||
Steps To Reproduce | Install latest version from github create a new survey, add a question. | ||||
Tags | No tags attached. | ||||
Bug heat | 8 | ||||
Complete LimeSurvey version number (& build) | 000000 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | FF | ||||
Database type & version | mysql 5.5.24-0ubuntu0.12.04.1 | ||||
Server OS (if known) | Ubuntu 12.04 | ||||
Webserver software & version (if known) | nginx 1.1.19-1 | ||||
PHP Version | 5.4 | ||||
Seems to the underlying problem stems from an incorrect variable used. Yii::app()->getConfig('generalscripts') returns a URL relative to the root domain. Which uses the root dir instead of the base url. Furthermore the method of inclusion only works for the PHP files; all assets like javascript files and images do not work. I think this controller should be rewritten to be more structured:
|
|
I can partly reproduce the problem. When trying to upload an image and clicking the "search server" button, I see the Limesurvey root page ("the following surveys are available:..."), URL is http://localhost/git/dev/Limesurvey/admin/kcfinder/index/load/browse?type=images&CKEditor=description_en&CKEditorFuncNum=2&langCode=de If I select a file from my local PC and click upload, the system also show part of the Limesurvey root page on top of the window (hard to recognize). |
|
So i've been looking at the code and to me it seems a very complex solution to a relatively simple problem. -- First of all there is the general issue of including 3rd party libraries (like kcfinder) without changing them. In my opinion we should not separate any files inside the library; ie. the separation between js / css assets and php scripts should not be applied since the code base is not part of limesurvey. A solution that in my opinion is the nicest is to create a /vendors directory. (I'm aware of some of the other existing directories /application/third_party) The complex kcfinder action (/application/controllers/admin/kcfinder.php can now be replaced with the following trivial code: Note that initializeSession contains the existing code for setting variables in the session. By using a redirect we are free of all the annoying asset-rewriting stuff. Furthermore we should, in my opinion, not use include on php files that are not meant to be included. (kcfinder uses session_start for example which results in errors since a session is already started by Yii) Another advantage of such a strict separation is that it becomes easier to upgrade kcfinder. --> I can create a fix in git and generate a pull request. --> Someone should create a post about the directory layout and the intentions behind it... It is hard for developers new to limesurvey development to contribute without constantly knowing these design decisions. |
|
This is fixed in my fork, along with some other changes:
-- Regression: |
|
"Someone should create a post about the directory layout and the intentions behind it... It is hard for developers new to limesurvey development to contribute without constantly knowing these design decisions." Sam: I'll second that ! |
|
Our manual is a wiki, everyone can edit and extend it. Please create a new page at http://docs.limesurvey.org/LimeSurvey+2.x+development+documentation and sum up your findings there. Thanks! |
|
Mazi, can you plz give me permissions to edit stuff? It seems i dont belong to everyone =( |
|
Hmm... usually you only need to create an account on limesurvey.org and when then being logged in there and clicking on "documentation", you should be logged in at the wiki automatically. |
|
errorsError I am logged in, username: sammousa |
|
c_schmitz, please assign wiki user "sammousa" rights to add articles at the development section of the wiki. |
|
sammousa, please try again now, we have changed your rights. |
|
works! can be closed since this code is in RC8. |
|
Version 2.00 RC 9 released. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2012-08-01 10:48 | sammousa | New Issue | |
2012-08-01 12:27 | sammousa | Note Added: 20099 | |
2012-08-01 12:28 | sammousa | Note Edited: 20099 | |
2012-08-01 14:49 | Mazi | Note Added: 20100 | |
2012-08-01 14:49 | Mazi | Assigned To | => c_schmitz |
2012-08-01 14:49 | Mazi | Status | new => assigned |
2012-08-01 14:51 | Mazi | Note Edited: 20100 | |
2012-08-02 13:57 | sammousa | Note Added: 20115 | |
2012-08-04 13:42 | c_schmitz | Assigned To | c_schmitz => sammousa |
2012-08-06 14:29 | sammousa | Relationship added | related to 06432 |
2012-08-06 14:33 | sammousa | Note Added: 20224 | |
2012-08-07 11:16 | c_schmitz | Status | assigned => resolved |
2012-08-07 11:16 | c_schmitz | Fixed in Version | => 2.00+ |
2012-08-07 11:16 | c_schmitz | Resolution | open => fixed |
2012-08-07 15:38 | abita1 | Note Added: 20248 | |
2012-08-07 16:38 | Mazi | Note Added: 20251 | |
2012-08-07 17:58 | sammousa | Note Added: 20252 | |
2012-08-07 22:02 | Mazi | Note Added: 20264 | |
2012-08-07 23:15 | sammousa | Note Added: 20265 | |
2012-08-08 08:56 | Mazi | Assigned To | sammousa => c_schmitz |
2012-08-08 08:56 | Mazi | Status | resolved => assigned |
2012-08-08 08:56 | Mazi | Note Added: 20273 | |
2012-08-08 09:12 | Mazi | Note Added: 20274 | |
2012-08-08 09:12 | Mazi | Assigned To | c_schmitz => Mazi |
2012-08-08 09:12 | Mazi | Status | assigned => feedback |
2012-08-09 15:12 | sammousa | Note Added: 20311 | |
2012-08-09 15:12 | sammousa | Status | feedback => assigned |
2012-08-09 15:12 | sammousa | Status | assigned => resolved |
2012-08-09 15:12 | sammousa | Assigned To | Mazi => c_schmitz |
2012-08-12 15:32 | c_schmitz | Fixed in Version | 2.00+ => 2.00RC9 |
2012-08-15 00:22 | c_schmitz | Target Version | => 2.00RC9 |
2012-08-16 10:23 | c_schmitz | Note Added: 20478 | |
2012-08-16 10:23 | c_schmitz | Status | resolved => closed |
2019-11-01 17:25 | c_schmitz | Category | Survey design => Survey editing |