trac-wysiwyg plugin doesn't show

Bug #683204 reported by Etienne Ringuet
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
trac-wysiwyg (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: trac-wysiwyg

When installing trac with trac-wysiwyg the wysiwyg editor is never activated even with

[components]
tracwysiwyg.* = enabled

in trac.ini.

root@svn:~/Trac-0.12.1# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04 LTS
Release: 10.04
Codename: lucid

root@svn:~/Trac-0.12.1# apt-cache policy trac
trac:
  Installed: 0.11.7-1
  Candidate: 0.11.7-1
  Version table:
 *** 0.11.7-1 0
        500 http://ca.archive.ubuntu.com/ubuntu/ lucid/universe Packages
        100 /var/lib/dpkg/status

root@svn:~/Trac-0.12.1# apt-cache policy trac-wysiwyg
trac-wysiwyg:
  Installed: 0.2+svn5931-1
  Candidate: 0.2+svn5931-1
  Version table:
 *** 0.2+svn5931-1 0
        500 http://ca.archive.ubuntu.com/ubuntu/ lucid/universe Packages
        100 /var/lib/dpkg/status

Expected: When editing a wiki page, the wysiwyg option should be shown

Happening: No wysiwyg option is shown.

Revision history for this message
Holger Obermaier (holger-obermaier) wrote :

After installing the plugin you need to do the trac deployment once again
e.g.
trac-admin /srv/trac/YourTracName deploy /usr/share/trac

After this you need to create a symbolic link to jquery.js
ln -s /usr/share/javascript/jquery/jquery.js /usr/share/trac/htdocs/common/js/jquery.js
This link is alread created in /usr/share/pyshared/trac/htdocs/js/
but not copied over to the deployment directory.

After this the trac-wysiwyg plugin worked correct.

Revision history for this message
Mike Dunphy (mdunphy-aptina) wrote :

I have the same problem with the same version.
Applying the fix did not help either
Any ideas ?

Revision history for this message
Etienne Ringuet (eringuet) wrote :

I downloaded the last TRAC release and updated my project. After, I redeployed the project. I didn't need to symlink jquery.

Revision history for this message
Mike Dunphy (mdunphy-aptina) wrote :

Here are the errors I get:
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.6; InfoPath.2; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)
Timestamp: Wed, 12 Jan 2011 16:57:47 UTC

Message: 'jQuery' is undefined
Line: 1
Char: 1
Code: 0
URI: http://xyz/trac/chrome/common/js/trac.js

Message: 'jQuery' is undefined
Line: 1
Char: 1
Code: 0
URI: http://xyz/trac/chrome/common/js/search.js

Message: Object expected
Line: 1
Char: 1
Code: 0
URI: http://xyz/trac/chrome/tracwysiwyg/wysiwyg-load.js

Message: 'jQuery' is undefined
Line: 3
Char: 1
Code: 0
URI: http://xyz/trac/chrome/common/js/wikitoolbar.js

Message: Object expected
Line: 27
Char: 7
Code: 0
URI: http://xyz/trac/wiki/WikiStart?action=edit

So I guess I'll bypass the ubuntu release of trac for 10.04 LTS that I get w/ apt get and try the latest release

Revision history for this message
Mike Dunphy (mdunphy-aptina) wrote :

The update fixed it. However I had to completely remove all the ubuntu stuff w/ apt-get remove and use easy_install as it apparently left leftovers around when I just used easy_install. trac-admin still had some pieces and parts of the older version

Revision history for this message
Zhang Zhuo (thinkdoggie) wrote :

I had a better solution for this issue.

The reason of this issue is that the handler used in Trac can support "symbolic link", but Apache can. Unfortunately, the file jquery.js which trac-wysiwyg required is a symbolic file stored in /usr/share/pyshared/trac/htdocs/js. If we can serve static resources of <project_url>/chrome/common/* by Apache, the trac-wysiwyg plugin will works.

Add following lines to Apache configuration file:

AliasMatch /projects/[^/]+/chrome/common/(.+) /usr/share/pyshared/trac/htdocs/$1

<Directory /usr/share/pyshared/trac/htdocs>
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

This fix also works on multiple-project trac site.

Revision history for this message
Zhang Zhuo (thinkdoggie) wrote :

In other words, this is not the fault of trac-wysiwyg, but a bug of trac itself. Package trac-wysiwyg merely reveals this bug of package trac. What do you think of?

Can any one deal with this situation?

Revision history for this message
Eric van der Vlist (vdv) wrote :

The apache configuration hack was not doing the trick for me and after some investigations, I have noticed that there was no link toward jquery.js in /usr/lib/python2.6/dist-packages/trac/htdocs/js/ ...

Adding a link here:

sudo ln -s /usr/share/pyshared/trac/htdocs/js/jquery.js /usr/lib/python2.6/dist-packages/trac/htdocs/js/

fixed the issue for me.

Eric

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.