View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
06599 | Bug reports | Theme editor | public | 2012-09-27 15:49 | 2012-10-05 15:26 |
Reporter | Mazi | Assigned To | DenisChenu | ||
Priority | normal | Severity | partial_block | ||
Status | closed | Resolution | fixed | ||
Product Version | 2.00+ | ||||
Target Version | 2.00+ | Fixed in Version | 2.00+ | ||
Summary | 06599: All old custom templates are incompatible with Limesurvey 2 | ||||
Description | When using any older Limesurvey templates, be it the old 1.92 shipped templates or a customized template, these do NOT work at Limesurvey 2. The reason is that at Limesurvey 2 a new placeholder {TEMPLATEJS} was introduced which only exists at the startpage.pstpl file of the shipped templates: At Limesurvey 1.9x we simply included the template.js using: ...and all the jquery files were added automatically. This has now drasticlly changed resulting in users being not able to use any but the shipped LS2 templates which is NOT very user friendly and has and will cause lots of complaints. | ||||
Steps To Reproduce |
| ||||
Additional Information | I think the problem can be solved quite easily by improving the Limesurvey 2 code which takes care of the placeholders:
| ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 20 | ||||
Complete LimeSurvey version number (& build) | 120926 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | Chrome | ||||
Database type & version | MySQL 5 | ||||
Server OS (if known) | Windows 7 | ||||
Webserver software & version (if known) | Apache 2.2 | ||||
PHP Version | 5.3.1 | ||||
Denis, Carsten is very busy so I'm assigning this one to you. Let me know if you have any questions. |
|
You can see the broken conditions and the broken progress bar here. At this demo survey, a following question should show up if you select "yes":
|
|
1.8 -> 1.9 : Condition don't work (question.pstpl + {QUESTION_ESSENTIALS}) There a lot of incompatibility each time we make a sub update (1.7,1.8, ....), here it's a major update 1 -> 2. Thin we can have same think for 2.0, and now : we can start to use some PHP script to compress js file and css files. I can do a Here, to update template: just 1 line to change. If you remind the 1.90 at the forum, we have a lot of user with : conditoon do not work, becaus the question.pstpl. Denis |
|
I think we should do the string replacement or some other "automatic" solution for existing custom templates - there will be a LOT of them. |
|
We have this problem here too. It would nice if this could be fixed as the rest of 2.0 seems very good. Jon |
|
Thanks for your feedback, Denis. I absolutely understand your point that between certain releases, incompatibilities may show up. |
|
In general I think incompatible template changes should get their own place in the release notes. Wordpress for example always tells what was changed for template designers and plugin developers. For this specific change... Expression Manager introduced the same kind of issues when the validation css changed and some default block had to be added to all templates. |
|
I search for an: str_replace("<script type="text/javascript" src="{TEMPLATEURL}template.js"/></script>","{TEMPLATEJS}" ) in upload/template/*/startpage.pstpl before apply it allways. Denis |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=9568 |
|
Docs: |
|
Mazi: can you look if it's OK for the update with the last GIT version. |
|
Thanks for looking into this, Denis. Unfortunately the fix only adds the missing {TEMPLATEJS} by editing the template files during update. This is a problem for several reasons:
Though your fix is great code-wise, there are some more situations where your fix might not be sufficient. This way all the problems mentioned above will be solved, we need no new DB version number and we also wouldn't need to take care of extending the DB setup and update procedure. Do you think you could implement it this way? Thanks! |
|
I i test if TEMPLATEJS are in startpage.pstpl, then it can be adding 2 times: Some user can want to have some survey witjout javascript etc .... The best wayi sto make an |
|
Shnoulle, I talked to Mazi, discussed this and we both think that your solution is fine. I like this much better than replacing this on the fly again and again during runtime. Two points are missing though.
Can you add these missing points, please? Great work, btw. |
|
Oh yeah ! GREAT IDEA !!! Before this idea, i think of a "error line" at template editor:
Denis |
|
Yeah, great work Denis. But just so I'm clear on the end result:
|
|
I think you are right, Tony... but that brings us to another problem: What about templates being uploaded by FTP instead of using the template editor? |
|
Have the same problem here. |
|
Well, upload by FTP was never supported by the application, anyway. In general we have to assume that people use the import function. |
|
Something i don't understand, If you upload via FTP, you can't take time to change one line before upload ? Denis And again, it's not the only think to change betwwen template. Denis |
|
You are right, Denis. We can't take care of users uploading templates via FTP. In this case we should point them to the manual. So if we take care about template import (fix needed) and have another check when updating to LS2 (already implemented), I think that is all we can do for now. |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=9610 |
|
Reminder sent to: Mazi, tpartner Can you look if it's OK please ? |
|
Looks fine to me Denis, thanks. |
|
You forgot to raise the DBVersion on the .sql files but I did that for you now ;). Thank you for your work! |
|
At install, yes, I see that . Thanks to you |
|
I can confirm that Denis' fix works great! Thanks a lot for solving this issue, Denis. |
|
New version 2.00+ build 121005 released. |
|
LimeSurvey: master 37f717e0 2012-09-27 12:37 Details Diff |
Fixed issue 06599: Old template incompatibilty, need {TEMPLATEJS} Dev : update db version to replace template.js line with {TEMPLATEJS} Dev: fix error_view in response browsing for inactive survey |
Affected Issues 06599 |
|
mod - application/config/version.php | Diff File | ||
mod - application/controllers/admin/responses.php | Diff File | ||
mod - application/helpers/update/updatedb_helper.php | Diff File | ||
LimeSurvey: master e07579c5 2012-10-02 06:51 Details Diff |
Fixed issue 06599 : Old custom templates incompatibility : replace template.js by {TEMPLATEJS} when upload Dev: add a private function _templateFixes($templatename) Dev : update release_notes.txt , to do : update docs.limesurvey.org |
Affected Issues 06599 |
|
mod - application/controllers/admin/templates.php | Diff File | ||
mod - application/views/admin/templates/importuploaded_view.php | Diff File | ||
mod - docs/release_notes.txt | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-09-27 15:49 | Mazi | New Issue | |
2012-09-27 15:49 | Mazi | Status | new => assigned |
2012-09-27 15:49 | Mazi | Assigned To | => DenisChenu |
2012-09-27 15:56 | Mazi | Description Updated | |
2012-09-27 15:56 | Mazi | Steps to Reproduce Updated | |
2012-09-27 15:56 | Mazi | Additional Information Updated | |
2012-09-27 15:56 | Mazi | File Added: limesurvey_survey_456431.lss | |
2012-09-27 15:57 | Mazi | Note Added: 20851 | |
2012-09-27 15:59 | Mazi | Issue Monitored: tpartner | |
2012-09-27 16:02 | Mazi | Note Added: 20852 | |
2012-09-27 16:07 | DenisChenu | Note Added: 20853 | |
2012-09-27 16:13 | DenisChenu | Note Edited: 20853 | |
2012-09-27 16:16 | tpartner | Note Added: 20854 | |
2012-09-27 16:18 | jonbyrne | Note Added: 20855 | |
2012-09-27 16:30 | Mazi | Note Added: 20856 | |
2012-09-27 17:09 | mdekker | Note Added: 20858 | |
2012-09-27 17:19 | DenisChenu | Note Added: 20859 | |
2012-09-27 19:38 | DenisChenu | Changeset attached | => LimeSurvey master 37f717e0 |
2012-09-27 19:38 | DenisChenu | Note Added: 20860 | |
2012-09-27 19:38 | DenisChenu | Resolution | open => fixed |
2012-09-27 19:39 | DenisChenu | Note Added: 20861 | |
2012-09-27 19:40 | DenisChenu | Note Added: 20862 | |
2012-09-27 19:40 | DenisChenu | Assigned To | DenisChenu => Mazi |
2012-09-27 19:40 | DenisChenu | Status | assigned => feedback |
2012-09-28 08:18 | DenisChenu | Issue Monitored: DenisChenu | |
2012-09-28 10:40 | Mazi | Note Added: 20871 | |
2012-09-28 10:40 | Mazi | Status | feedback => assigned |
2012-09-28 10:40 | Mazi | Assigned To | Mazi => DenisChenu |
2012-09-28 10:40 | Mazi | Issue Monitored: c_schmitz | |
2012-09-28 10:47 | DenisChenu | Note Added: 20872 | |
2012-09-28 10:58 | c_schmitz | Note Added: 20873 | |
2012-09-28 10:58 | c_schmitz | Note Edited: 20873 | |
2012-09-28 10:59 | c_schmitz | Note Edited: 20873 | |
2012-09-28 11:06 | DenisChenu | Note Added: 20874 | |
2012-09-28 11:41 | tpartner | Note Added: 20875 | |
2012-09-28 11:43 | Mazi | Note Added: 20876 | |
2012-09-28 16:45 | Fred | Note Added: 20884 | |
2012-09-28 16:48 | c_schmitz | Note Added: 20885 | |
2012-09-28 18:22 | DenisChenu | Note Added: 20886 | |
2012-09-28 18:24 | DenisChenu | Note Edited: 20886 | |
2012-09-28 22:38 | Mazi | Note Added: 20887 | |
2012-10-02 13:52 | DenisChenu | Changeset attached | => LimeSurvey master e07579c5 |
2012-10-02 13:52 | DenisChenu | Note Added: 20978 | |
2012-10-03 19:09 | DenisChenu | Note Added: 21008 | |
2012-10-03 20:27 | tpartner | Note Added: 21010 | |
2012-10-03 22:12 | c_schmitz | Note Added: 21012 | |
2012-10-03 22:12 | c_schmitz | Status | assigned => resolved |
2012-10-03 22:12 | c_schmitz | Fixed in Version | => 2.00+ |
2012-10-04 07:29 | DenisChenu | Note Added: 21016 | |
2012-10-04 11:25 | Mazi | Note Added: 21025 | |
2012-10-05 15:26 | c_schmitz | Note Added: 21082 | |
2012-10-05 15:26 | c_schmitz | Status | resolved => closed |
2015-12-11 14:40 | c_schmitz | Category | Templates => Theme editor |
2021-08-03 00:59 | guest | Bug heat | 14 => 20 |