Search:  
Gentoo Wiki

TIP_Thunderbird_components_fix

This article is part of the Tips & Tricks series.
Terminals / Shells Network X Window System Portage System Filesystems Kernel Other
This page is a candidate for deletion 
Reason given: Information on this page is no longer relevant.
If you disagree with its deletion, please explain why on its discussion page.
If you intend to fix it, please remove this notice, but do not remove this notice from articles that you have created yourself.
Make sure no other pages link here and check the page's history before deleting.

Contents

Problem

You have emerged thunderbird 0.7.3 or 0.7.3-r1 and you can't get the forumzilla plug-in to work. If you open the javascript window, you see that you have the following errors:

Error: XMLSerializer is not defined
Source File: chrome://forumzilla/content/global.js
Line: 53
Error: appDirectoryService has no properties
Source File: chrome://forumzilla/content/FeedService.js
Line: 285

Cause

The xmlextras component is not installed with these releases, so scripts that rely on XML component features will raise errors.

Fix

Note that this fix is only for the situation and build versions described above.

Backup your profiles

Before messing around with builds it's always a good idea to backup your data. Your profile is in your .thunderbird folder in your home directory. You can back it up with the copy command (cp), the -r option makes it copy all the subdirectories:

#cp -r .thunderbird thunderbird.backup

Un-install the forumzilla plug-in

You may need to repeat this for each profile that you have the extension installed under.

Remove Thunderbird

#su - root

#emerge unmerge mozilla-thunderbird

Modify the build settings

#nano -w /usr/portage/eclass/mozilla.eclass

File: mozilla.eclass
 # Setup extensions.
 # This is a little strange because "configure" is the same for moz/ff/tb but
 # the extensions don't work everywhere.  In particular we don't want to
 # start the ff/tb lists with "default"
 if ${MOZ}; then
 	myext="default"
 	use mozdevelop && myext="${myext},venkman"
 	use gnome && myext="${myext},gnomevfs"
 	use moznoirc && myext="${myext},-irc"
 	use mozxmlterm && myext<="${myext},xmlterm"
 elif ${FF}; then
 	# note that help is broken, and irc doesn't work
 	myext="cookie,inspector,negotiateauth,pref,transformiix,typeaheadfind,universalchardet,webservices,xmlextras,xml-rpc"
 	use mozdevelop && myext="${myext},venkman"
 	use gnome && myext="${myext},gnomevfs"
 else
 	myext="pref,spellcheck,universalchardet,wallet"
 fi

The {$MOZ} block is for mozilla itself, ${FF} is for firefox, so for thunderbird you need to add to the line myext="..." after the last else, so that it looks like this:

 myext="pref,spellcheck,universalchardet,wallet,xmlextras"

Then save the file.

Re-install

#emerge mozilla-thunderbird

Troubleshooting

Your extension should now work. To verify that the xmlextras component has been installed:
#ls /usr/lib/MozillaThunderbird/components

should display the following files:

libxmlextras.so<br> xmlextras.xpt

This shows that the files have been installed by the build. If not, check that mozilla.eclass still contains your modification.

#grep XMLSerializer /usr/lib/MozillaThunderbird/components/xpti.dat

should return something like:

846,nsIRDFXMLSerializer,{8ae1fbf8-1dd2-11b2-bd21-d728069cca92},26,-1,1

The numbers don't matter so much as the line existing which means the component has been registered with xpcom. If this line is not there you could try rebuilding the xpti.dat file:

Code:
#rm /usr/lib/MozillaThunderbird/components/xpti.dat

#/usr/lib/MozillaThunderbird/regxpcom

If the line still fails to appear but the files listed earlier exist in the correct place, this suggests a problem with regxpcom.

#grep XMLSerializer /usr/lib/MozillaThunderbird/components/compreg.dat

should return:

Javascript DOM class,XMLSerializer,@mozilla.org/xmlextras-domci-extender;1

This means that the component has been registered with xpconnect and javascript calls should get mapped to the correct object. If this line is not there you could try rebuilding the compreg.dat file:

Code:
#rm /usr/lib/MozillaThunderbird/components/compreg.dat

#/usr/lib/MozillaThunderbird/regchrome

If the line still fails to appear, this suggests a problem with regchrome.

These last two files (xpti.dat and compreg.dat) also exist in your profile directory. They are cached, but installing a plug-in should cause them to be re-built. If not, you can delete or rename them as they will get re-created the next time you run thunderbird. The cached files / directories that sometimes cause problems are:

Retrieved from "http://www.gentoo-wiki.info/TIP_Thunderbird_components_fix"

Last modified: Tue, 10 Jun 2008 07:32:00 +0000 Hits: 12,787