| Anonymous | Login | 2013-05-22 03:51 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap | Repositories |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 05066 | Bug reports | [All Projects] Templates | public | 2011-03-29 11:41 | 2011-05-04 19:31 | ||||
| Reporter | user13073 | ||||||||
| Assigned To | c_schmitz | ||||||||
| Priority | urgent | Severity | major | ||||||
| Status | closed | Resolution | fixed | ||||||
| Product Version | 1.91RC5 | ||||||||
| Target Version | Fixed in Version | 1.91 | |||||||
| Summary | 05066: GSOC: Template editor malfunction: Cannot change editing file; and Incorrect filename in template file upload | ||||||||
| Description | 1. Cannot change file to edit. Always go back to File 'startpage.pstpl' 2. When upload a file to any template, , in template editor, it becomes photo_jpg | ||||||||
| Steps To Reproduce | fresh install 1.91RC5 then go to template editor, copy any stock templates, try switching Standard files: always go back to File 'startpage.pstpl' then try upload any photo, say, photo.jpg, it becomes photo_jpg when upload finished. | ||||||||
| I will donate to the project if issue is resolved within 48 hrs | No | ||||||||
| LimeSurvey build number | 9872 | ||||||||
| Browser | |||||||||
| Database & DB-Version | MySQL | ||||||||
| Operating System (Server) | Debian 2.6.26-25lenny1 | ||||||||
| Webserver software & version | Nginx | ||||||||
| PHP Version | 5 | ||||||||
| Attached Files | |||||||||
Notes |
|
|
(14622) user13064 2011-03-31 03:10 |
Please check it and give feedback if there is any problem. |
|
c_schmitz (administrator) 2011-04-04 13:44 |
murarivivek, that patch is bogus. With the suggested change all invalid characters are replaced with dots but all invalid chars shoudl be replaced with an underscore. Please submit an new patch. |
|
dodev (reporter) 2011-04-05 17:48 |
Well, there was a '.' in the forbidden symbols. Removing it solves the problem :) |
|
(14680) user13064 2011-04-05 23:48 edited on: 2011-04-05 23:48 |
@dodev yes, that seems to solve the problem |
|
DenisChenu (developer) 2011-04-06 15:13 |
Hello, You need to remove all dot (.) in the filename except the last one for extension. For extension, you can remove all non alphanumeric carater, or use the same condition of the filename if you want. With this patch you can have a file...............name.exte....sio....n |
|
(14699) user13064 2011-04-06 16:14 |
this first takes note of position of last dot in the string. After replacing all not allowed chars, it changes the _ at last dot position to dot again. Hope this solves the issue |
|
DenisChenu (developer) 2011-04-06 17:40 |
And if lastdot == -1 ? |
|
(14709) user13064 2011-04-06 22:52 |
I made changes such that if lastdot== -1 it will do nothing and leave the filename as before! |
|
DenisChenu (developer) 2011-04-07 10:13 |
Assign it again to Carsten for reviewing :) |
|
(14790) user13073 2011-04-12 10:37 |
Thanks! Problem #2 fixed, but how about #1 the error of changing editing template file? Looks like someone else also posted the same problem in forum: http://www.limesurvey.org/en/forum/installation-a-update-issues/59255-problems-editing-with-template-editor [^] |
|
c_schmitz (administrator) 2011-04-12 13:33 edited on: 2011-04-12 13:38 |
Can't reproduce #1. Works just fine here. Maybe a permission problem in your template folder? Check the permissions on /upload/templates and subfolders/files |
|
(14804) user13073 2011-04-13 04:51 |
Same problem persists even after tried "chmod -R 777 upload/", it also happens on windows server. Can copy template and change editing Screen, but cannot change editing template file, always go back to startpage.pstpl, plus when try to save changes to startpage.pstpl, got "Invalid template filename" error. |
|
magiclko (developer) 2011-04-13 16:19 |
I can't reproduce it either(on windows server)! |
|
c_schmitz (administrator) 2011-04-13 16:29 |
Check your global settings and see if you have set a valid template as default. |
|
ftrifoglio (reporter) 2011-04-14 20:31 |
I get the same on 1.91RC6. In the template editor I can rename, delete, import, export, copy a template browse the templates (default, basic, ...) browse the screens (welcome page, question page, ...) I cannot browse and edit .pstpl files browse and edit .css .js files |
|
c_schmitz (administrator) 2011-04-16 16:48 |
yong, did you check your global settings as requested? |
|
(14841) user13515 2011-04-18 18:16 edited on: 2011-04-18 21:09 |
same problem here. I can copy each default/basic-template but cannot edit them. The navigation on the left (welcome etc. and the *.css-files) always "jumps back" to startpage.pstl. My Global Settings say "default" as default-template. I am on RC6. Windows Server 2003. In the log-file of limesurvey nothing related appears. In script-console (new stable release of chrome and firefox) no errors appear. I did the upgrade from 1.90 to RC6, because of issues with conditional questions. |
|
(14842) user13515 2011-04-18 21:10 edited on: 2011-04-18 21:34 |
oh and when I try to save the current pstpl-file - which is startpage.pstpl - I get an error: Invalid template filename Update: I've tested something (I added a testoutput "echo "$editfile";" and found out, that the filename, which is tried to be saved startpage_pstpl instead of startpage.pstpl. Probably this line "if (!isset($editfile)) {$editfile = sanitize_filename(returnglobal('editfile'));}" contains an error? (see template.php) |
|
(14862) user13073 2011-04-26 09:56 |
Sorry, Schmitz. I was not posting feedback earlier. I did check my global settings and do have set a valid template as default. Looks like Landv0gt might have caught the problem, problem with sanitize_filename function, similar to the file upload problem. I'll try to see if the same patch fix the problem #1 too. |
|
c_schmitz (administrator) 2011-04-27 18:19 |
seriously yong, I assumed you had tested that. Please check and report back. Thank you! |
|
(14868) user13073 2011-04-28 05:22 |
Confirming the patch fixed both problem #1 and #2. Thanks everyone. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2011-03-29 11:41 | user13073 | New Issue | |
| 2011-03-29 20:03 | c_schmitz | Assigned To | => c_schmitz |
| 2011-03-29 20:03 | c_schmitz | Status | new => assigned |
| 2011-03-29 20:03 | c_schmitz | Summary | Template editor malfunction: Cannot change editing file; and Incorrect filename in template file upload => GSOC: Template editor malfunction: Cannot change editing file; and Incorrect filename in template file upload |
| 2011-03-31 03:07 | user13064 | File Added: sanitize.diff | |
| 2011-03-31 03:10 | user13064 | Note Added: 14622 | |
| 2011-04-04 13:44 | c_schmitz | Note Added: 14652 | |
| 2011-04-04 13:44 | c_schmitz | Status | assigned => feedback |
| 2011-04-05 17:47 | dodev | File Added: fix_santize.diff | |
| 2011-04-05 17:48 | dodev | Note Added: 14678 | |
| 2011-04-05 23:48 | user13064 | Note Added: 14680 | |
| 2011-04-05 23:48 | user13064 | Note Edited: 14680 | View Revisions |
| 2011-04-06 15:11 | DenisChenu | Assigned To | c_schmitz => DenisChenu |
| 2011-04-06 15:11 | DenisChenu | Status | feedback => assigned |
| 2011-04-06 15:13 | DenisChenu | Note Added: 14697 | |
| 2011-04-06 16:11 | user13064 | File Added: modifiedsanitize.diff | |
| 2011-04-06 16:14 | user13064 | Note Added: 14699 | |
| 2011-04-06 17:40 | DenisChenu | Note Added: 14700 | |
| 2011-04-06 22:52 | user13064 | Note Added: 14709 | |
| 2011-04-06 22:52 | user13064 | File Added: finversanitize.diff | |
| 2011-04-07 10:12 | DenisChenu | Assigned To | DenisChenu => c_schmitz |
| 2011-04-07 10:13 | DenisChenu | Note Added: 14719 | |
| 2011-04-11 13:44 | c_schmitz | File Deleted: sanitize.diff | |
| 2011-04-11 13:44 | c_schmitz | File Deleted: fix_santize.diff | |
| 2011-04-11 13:54 | c_schmitz | Status | assigned => resolved |
| 2011-04-11 13:54 | c_schmitz | Fixed in Version | => 1.91 |
| 2011-04-11 13:54 | c_schmitz | Resolution | open => fixed |
| 2011-04-12 10:34 | user13073 | Note Added: 14788 | |
| 2011-04-12 10:37 | user13073 | Note Added: 14790 | |
| 2011-04-12 10:37 | user13073 | Status | resolved => feedback |
| 2011-04-12 10:37 | user13073 | Resolution | fixed => reopened |
| 2011-04-12 11:36 | user13073 | Note Deleted: 14788 | |
| 2011-04-12 13:33 | c_schmitz | Note Added: 14795 | |
| 2011-04-12 13:38 | c_schmitz | Note Edited: 14795 | View Revisions |
| 2011-04-13 04:51 | user13073 | Note Added: 14804 | |
| 2011-04-13 04:51 | user13073 | Status | feedback => assigned |
| 2011-04-13 16:19 | magiclko | Note Added: 14809 | |
| 2011-04-13 16:29 | c_schmitz | Note Added: 14810 | |
| 2011-04-14 20:31 | ftrifoglio | Note Added: 14816 | |
| 2011-04-16 16:48 | c_schmitz | Note Added: 14826 | |
| 2011-04-16 16:48 | c_schmitz | Status | assigned => feedback |
| 2011-04-18 18:16 | user13515 | Note Added: 14841 | |
| 2011-04-18 21:09 | user13515 | Note Edited: 14841 | View Revisions |
| 2011-04-18 21:10 | user13515 | Note Added: 14842 | |
| 2011-04-18 21:25 | user13515 | Note Edited: 14842 | View Revisions |
| 2011-04-18 21:32 | user13515 | Note Edited: 14842 | View Revisions |
| 2011-04-18 21:34 | user13515 | Note Edited: 14842 | View Revisions |
| 2011-04-26 09:56 | user13073 | Note Added: 14862 | |
| 2011-04-26 09:56 | user13073 | Status | feedback => assigned |
| 2011-04-27 18:19 | c_schmitz | Note Added: 14865 | |
| 2011-04-27 18:19 | c_schmitz | Status | assigned => resolved |
| 2011-04-27 18:19 | c_schmitz | Resolution | reopened => fixed |
| 2011-04-28 05:22 | user13073 | Note Added: 14868 | |
| 2011-05-04 19:31 | c_schmitz | Status | resolved => closed |
| Copyright © 2000 - 2013 MantisBT Team |