Bug 7589 - tinymce editor broken in .deb packages - in 'en' templates
Summary: tinymce editor broken in .deb packages - in 'en' templates
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Packaging (show other bugs)
Version: 3.8
Hardware: All All
: P1 - high blocker (vote)
Assignee: Robin Sheat
QA Contact: Ian Walls
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-23 21:48 UTC by Thatcher Rea
Modified: 2019-06-27 09:24 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 7589 - tinymce editor broken in .deb packages - in 'en' templates (993 bytes, patch)
2012-05-08 05:02 UTC, Mason James
Details | Diff | Splinter Review
Bug 7589 - tinymce editor broken in .deb packages - in 'en' templates (1.14 KB, patch)
2012-05-08 23:37 UTC, Mason James
Details | Diff | Splinter Review
pix (107.11 KB, image/png)
2012-05-14 03:04 UTC, Mason James
Details
Signed off patch (1.46 KB, patch)
2012-08-11 00:30 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Thatcher Rea 2012-02-23 21:48:18 UTC
I suspect it may be related to paths issues in the package installs, but all of the ones we have checked do not load the WYSIWYG editor for creating new news items, regardless of browser, as well as the standard stable packages, and packages built off of master.
Comment 1 Thatcher Rea 2012-02-23 22:03:23 UTC
6 levels of symbolic linking on a package install:

http://screencast.com/t/DYcrZ4KTrkD

Contrast that to a git install:

http://screencast.com/t/CYfhjwQMLtwb
Comment 2 Mason James 2012-05-07 00:46:12 UTC
(In reply to comment #1)
> 6 levels of symbolic linking on a package install:
> 
> http://screencast.com/t/DYcrZ4KTrkD
> 
> Contrast that to a git install:
> 
> http://screencast.com/t/CYfhjwQMLtwb


we have also spotted this bug

fyi: the french tinymce dir looks OK, its just the english dir thats got the borked symlinks
Comment 3 Mason James 2012-05-08 05:02:02 UTC Comment hidden (obsolete)
Comment 4 Mason James 2012-05-08 23:37:41 UTC Comment hidden (obsolete)
Comment 5 Jared Camins-Esakov 2012-05-12 14:49:45 UTC
I tried this patch, and it didn't seem to fix the problem.
Comment 6 Mason James 2012-05-14 03:04:04 UTC
Created attachment 9548 [details]
pix
Comment 7 Mason James 2012-05-14 03:04:42 UTC
(In reply to comment #5)
> I tried this patch, and it didn't seem to fix the problem.

i just built and installed a Koha debian package, from these instruction...
http://wiki.koha-community.org/wiki/Building_Debian_Packages_-_The_Easy_Way


i applied this patch, and confirmed tiny_mce is now working


screen-shot attached....
Comment 8 Chris Cormack 2012-07-01 00:30:19 UTC
Hmm is this still a problem? Robin can you check, and elevate the severity if so please
Comment 9 Magnus Enger 2012-08-10 07:11:03 UTC
I just tested on an installation of 3.8.3 running off the official packages, and it has tiny_mce working beautifully for both English and Norwegian. Maybe this is just a problem for 3.6.x now?
Comment 10 Mason James 2012-08-10 12:02:22 UTC
(In reply to comment #9)
> I just tested on an installation of 3.8.3 running off the official packages,
> and it has tiny_mce working beautifully for both English and Norwegian.
> Maybe this is just a problem for 3.6.x now?



well... looks like its still broken, in the latest stable .deb

mason@gw1:~$ dpkg -c ./koha-common_3.8.3.1-1_all.deb |grep jscript |wc -l
0

what that '0' means is that there is ZERO dirs in the package called 'jscript'

the 'jscript' dir gets deleted in ./debian/rules 
rm -r $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/js/tinymce                        

which means that the below call for tiny_mce in ./prog/en/modules/tools/koha-news.tt will fail (which is the bug)

script language="javascript" type="text/javascript" src="[% themelang %]/js    /tinymce/jscripts/tiny_mce/tiny_mce.js"></script>  


and thats the bug, that the patch fixes
Comment 11 Robin Sheat 2012-08-10 12:09:33 UTC
The next line is:

       ln -s /usr/share/tinymce2/www \
                $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/js/tinymce

it's linking in the system copy of tinymce.
Comment 12 Magnus Enger 2012-08-10 12:27:34 UTC
(In reply to comment #9)
> I just tested on an installation of 3.8.3 running off the official packages,
> and it has tiny_mce working beautifully for both English and Norwegian.
> Maybe this is just a problem for 3.6.x now?

A little more digging reminded me that I made some non-standard symlinks at one time, forget my saying this works for me!
Comment 13 Mason James 2012-08-10 12:35:15 UTC
(In reply to comment #9)
> I just tested on an installation of 3.8.3 running off the official packages,
> and it has tiny_mce working beautifully for both English and Norwegian.
> Maybe this is just a problem for 3.6.x now?

Magnus has confessed that he fixed this bug manually using symlinks :)

so, 
1) yes, its still confirmed busted in master
2) yes, the patch still fixes it
Comment 14 Mason James 2012-08-10 14:34:17 UTC
(In reply to comment #11)
> The next line is:
> 
>        ln -s /usr/share/tinymce2/www \
>                
> $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/js/tinymce
> 
> it's linking in the system copy of tinymce.

yep, its that *specific* line that has the bug :) 
(hint: the destination path is wrong)
Comment 15 Jared Camins-Esakov 2012-08-11 00:30:26 UTC
Created attachment 11549 [details] [review]
Signed off patch

In order for the patch to work, you must *REMOVE* koha-common, and reinstall from scratch.

VERY IMPORTANT!!! The tabs in debian/rules are mandatory. Do not replace them with four spaces. Use -n when committing to skip pre-commit git hook verifications. VERY IMPORTANT!!!
Comment 16 Mason James 2012-09-14 12:43:10 UTC
> Created attachment 11549 [details] [review]
> Signed off patch
> 
> In order for the patch to work, you must *REMOVE* koha-common, and reinstall
> from scratch.
> 
> VERY IMPORTANT!!! The tabs in debian/rules are mandatory. Do not replace
> them with four spaces. Use -n when committing to skip pre-commit git hook
> verifications. VERY IMPORTANT!!!

bumping priority to an easy fix/sign-off patch
Comment 17 Paul Poulain 2012-10-03 15:37:50 UTC
QA comment:
 * tiny patch related to debian building, no side-effect risk

passed QA (note that the patch is declared as "octet-stream", not as patch. I had to apply it manually, git bz not working because there's no "patch")
Comment 18 Paul Poulain 2012-10-03 15:38:08 UTC
Patch pushed to master
Comment 19 Mason James 2012-10-03 20:24:53 UTC
(In reply to comment #17)
> QA comment:
>  * tiny patch related to debian building, no side-effect risk
> 
> passed QA (note that the patch is declared as "octet-stream", not as patch.
> I had to apply it manually, git bz not working because there's no "patch")

thanks for that Paul

fyi: you can edit any attachment, and 'tick the patch box', then save - to fix this 'octet-stream' problem
Comment 20 Chris Cormack 2012-10-03 21:49:02 UTC
Pushed to 3.8.x will be in 3.8.6
Comment 21 Magnus Enger 2013-04-03 19:50:37 UTC
Works as expected, for English, Swedish and Norwegian (tested with packages built off current master).