• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item6152: stand-alone html -> tml conversion broken

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension WysiwygPlugin Normal New   n/a  

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


I have a lot of very simple HTML to import.

tools/html2tml.pl script is advertised (http://twiki.org/cgi-bin/view/TWiki/WysiwygPlugin) "Using the translators from perl scripts" as being capable of stand-alone html to tml conversion. I always get an error "Can't call method "getPreferencesValue" on an undefined value"

The built-in wysiwyg editor (4.2.3) works. So it's something about the stand-alone environment. I haven't done anything to/for/about the "WYSIWYGPLUGIN_STICKYBITS" variable that's in the traceback that I obtained.

This seems like a bug -- though perhaps the terse 1 line in the documentation is missing some setup requirements.

How, exactly, is one supposed to set things up for stand-alone conversions?


cd tools/

./html2tml.pl /temp/foo.htm
Can't call method "getPreferencesValue" on an undefined value at /var/www/servers/twiki/lib/TWiki/Func.pm line 474, <> chunk 1.

Here is a sufficient example with traceback. For the purposes of the example, the script is reading from stdin - I pasted the text with ^d after hitting 'c' in the debugger. The traceback is identical when run from a file. (And when run with a complete html page.)

cd tools/
perl -d ./html2tml.pl
Loading DB routines from perl5db.pl version 1.28
Editor support available.
Enter h or `h h' for help, or `man perldebug' for more help.
main::(./html2tml.pl:12):       my $html2tml = new TWiki::Plugins::WysiwygPlugin::HTML2TML();
                                                                                                                                      DB<1> c
<font face="Arial"  size="6"><em>Redacted</em></font>

Redacted plain text <a href="foo_baz.htm">Albrecht</a> and
 <a href="../dir/foo_bard.htm">Anna </a> text.
Can't call method "getPreferencesValue" on an undefined value at /var/www/servers/twiki/lib/TWiki/Func.pm line 474, <> chunk 1.
 at /var/www/servers/twiki/lib/TWiki/Func.pm line 474
        TWiki::Func::getPreferencesValue('WYSIWYGPLUGIN_STICKYBITS') called at /var/www/servers/twiki/lib/TWiki/Plugins/WysiwygPlugin.pm line 563
        TWiki::Plugins::WysiwygPlugin::protectedByAttr('a', 'href') called at /var/www/servers/twiki/lib/TWiki/Plugins/WysiwygPlugin/HTML2TML/Node.pm line 564
        TWiki::Plugins::WysiwygPlugin::HTML2TML::Node::_isProtectedByAttrs('TWiki::Plugins::WysiwygPlugin::HTML2TML::Node=HASH(0x9ccb34c)') called at /var/www/servers/twiki/lib/TWiki/Plugins/WysiwygPlugin/HTML2TML/Node.pm line 413
        TWiki::Plugins::WysiwygPlugin::HTML2TML::Node::generate('TWiki::Plugins::WysiwygPlugin::HTML2TML::Node=HASH(0x9ccb34c)', 16) called at /var/www/servers/twiki/lib/TWiki/Plugins/WysiwygPlugin/HTML2TML/Node.pm line 486
        TWiki::Plugins::WysiwygPlugin::HTML2TML::Node::_flatten('TWiki::Plugins::WysiwygPlugin::HTML2TML::Node=HASH(0x9c9aaf8)', 16) called at /var/www/servers/twiki/lib/TWiki/Plugins/WysiwygPlugin/HTML2TML/Node.pm line 460
        TWiki::Plugins::WysiwygPlugin::HTML2TML::Node::generate('TWiki::Plugins::WysiwygPlugin::HTML2TML::Node=HASH(0x9c9aaf8)', 16) called at /var/www/servers/twiki/lib/TWiki/Plugins/WysiwygPlugin/HTML2TML/Node.pm line 227
        TWiki::Plugins::WysiwygPlugin::HTML2TML::Node::rootGenerate('TWiki::Plugins::WysiwygPlugin::HTML2TML::Node=HASH(0x9c9aaf8)', 16) called at /var/www/servers/twiki/lib/TWiki/Plugins/WysiwygPlugin/HTML2TML.pm line 126
        TWiki::Plugins::WysiwygPlugin::HTML2TML::convert('TWiki::Plugins::WysiwygPlugin::HTML2TML=HASH(0x9cda830)', '<head>\x{a}<font face="Arial"  size="6"><em>Redacted</em></font><...', 'HASH(0x9af9f88)') called at ./html2tml.pl line 15
Debugged program terminated.  Use q to quit or R to restart,

Installed plugins:

  • X509UserPlugin (V1.0-3, $Rev: 15942 (11 Aug 2008) $): X509 Authentication support, used by TWiki Administrators
  • SpreadSheetPlugin (any TWiki, $Rev: 17387 (11 Aug 2008) $): Add spreadsheet calculation like "$SUM( $ABOVE() )" to TWiki tables and other topic text
  • CalendarPlugin (Dakar, $Rev: 0 (23 Sep 2008) $): Show a monthly calendar with highlighted events
  • CommentPlugin (03 Aug 2008, $Rev: 17302 (11 Aug 2008) $): Allows users to quickly post comments to a page without an edit/preview/save cycle
  • EditTablePlugin (4.8.4, $Rev: 17302 (11 Aug 2008) $): Edit TWiki tables using edit fields, date pickers and drop down boxes
  • ImageGalleryPlugin (3.72, $Rev: 17034 (16 Jul 2008) $): Displays image gallery with auto-generated thumbnails from attachments
  • ImgPlugin (Dakar, $Rev: 10608$): Allows TWiki variable-style insertion of images in topics
  • InterwikiPlugin (03 Aug 2008, $Rev: 14913 (17 Sep 2007) $): Link ExternalSite:Page text to external sites based on aliases defined in a rules topic
  • PreferencesPlugin (TWiki-4.2, $Rev: 15487 (11 Aug 2008) $): Allows editing of preferences using fields predefined in a form
  • RenderListPlugin (2.0, $Rev: 16235 (11 Aug 2008) $): Render bullet lists in a variety of formats
  • SlideShowPlugin (02 Aug 2008, $Rev: 17260 (11 Aug 2008) $): Create web based presentations based on topics with headings.
  • SmiliesPlugin (Dakar, $Rev: 16049 (11 Aug 2008) $): Render smilies as icons,
  • SubscribePlugin (Dakar, $Rev: 13787 (18 May 2007) $): Subscribe to web notification
  • TablePlugin (1.034, $Rev: 17367 (11 Aug 2008) $): Control attributes of tables and sorting of table columns
  • TinyMCEPlugin (03 Aug 2008, $Rev: 17302 (11 Aug 2008) $): Integration of TinyMCE? with WysiwygPlugin
  • TwistyPlugin (1.4.10, $Rev: 15653 (19 Nov 2007) $): Twisty section JavaScript library to open/close content dynamically
  • WysiwygPlugin (03 Aug 2008, $Rev: 17359 (11 Aug 2008) $): Translator framework for Wysiwyg editors

-- TWiki:Main/TimotheLitt - 16 Dec 2008

Summary stand-alone html -> tml conversion broken
ReportedBy TWiki:Main.TimotheLitt
Codebase 4.2.3
SVN Range TWiki-5.0.0, Wed, 22 Oct 2008, build 17677
AppliesTo Extension
Component WysiwygPlugin
Priority Normal
CurrentState New


TargetRelease n/a

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r2 - 2010-03-03 - TimotheLitt
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback