• 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.
I'm migrating from Cairo to 4.1.1 and discovered some strangeness with DatabasePlugin 14908 (17 Sep 2007).

I went through the configure process on the web to set up the new format for LocalSite.cfg. Two things became immediately apparent:

  • If my database description doesn't match the database name, the connection to the database fails.
  • DATABASE_REPEAT appears to use table in places instead of table_name which causes it to fail.
    • The work around seems to be to replace table_name with table in the configuration file for TWiki.

Here is my example where I see the second failing.

 %DATABASE_REPEAT{description="pandora" columns="name,version,descrip,instdate"}%| [[%SCRIPTURL%/view%SCRIPTSUF
FIX%/%WEB%/PandoraToolInfo?name=%name%&version=%version%][%name% %version%]] | <nop>%descrip% | <nop> %instdat
e% |
%DATABASE_REPEAT% 
%DATABASE_EDIT{description="pandora" display_text="Edit the above table"}%


My LocalSite.cfg for the plugin looks like:

 $TWiki::cfg{Plugins}{DatabasePlugin}{Databases} = [
                                                    {   
                                                      'sid' => '',
                                                      'hostname' => 'databasehost',
                                                      'description' => 'pandora',
                                                      'username' => 'pandora_admin',
                                                      'database' => 'pandora',
                                                      'password' => 'password',
                                                      'table' => 'packages',
                                                      'driver' => 'mysql'
                                                    }   
                                                  ];  


The stack backtrace when description doesn't match database is


No such DB pandora at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/Plugins/DatabasePlugin.pm line 76. at /usr/local/.package/perl-5.8.8/lib/5.8.8/CGI/Carp.pm   line 319 CGI::Carp::realdie('No such DB pandora at /proj/twiki/testing/testboot/twiki4.1.1...') 
called at /usr/local/.package/perl-5.8.8/lib/5.8.8/CGI/Carp.pm line 396 CGI::Carp::die('No such DB pandora') 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/Plugins/DatabasePlugin.pm line 76 eval {...} 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/Plugins/DatabasePlugin.pm line 75 TWiki::Plugins::DatabasePlugin::_dispatch('DATABASE_REPEAT',           'description="pandora" columns="name,version,descrip,instdate"', '| [[http://www/twiki-test/testboot/twiki4.1.1/bin/view/Mai...') 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/Plugins/DatabasePlugin.pm line 95 TWiki::Plugins::DatabasePlugin::commonTagsHandler('---+!!              PandoraToolsList\x{a}\x{a}This is a list of tools that are curr...', 'PandoraToolsList', 'Main', 0) 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/Plugin.pm line 245 TWiki::Plugin::invoke('TWiki::Plugin=HASH(0x8d8df04)', 'commonTagsHandler', '---+!!   PandoraToolsList\x{a}\x{a}This is a list of tools that are curr...', 'PandoraToolsList', 'Main', 0) 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/Plugins.pm line 333 TWiki::Plugins::_dispatch('TWiki::Plugins=HASH(0x88213c8)', 'commonTagsHandler',     '---+!!PandoraToolsList\x{a}\x{a}This is a list of tools that are curr...', 'PandoraToolsList', 'Main', 0) 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/Plugins.pm line 470 TWiki::Plugins::commonTagsHandler('TWiki::Plugins=HASH(0x88213c8)', '---+!!          PandoraToolsList\x{a}\x{a}This is a list of tools that are curr...', 'PandoraToolsList', 'Main', 0) 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki.pm line 2596 TWiki::handleCommonTags('TWiki=HASH(0x804d6d0)', '---+!!PandoraToolsList\x{a}\x{a}This is a list of tools that are currently ins...', 'Main', 'PandoraToolsList') 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/UI/View.pm line 375 TWiki::UI::View::_prepare('---+!!PandoraToolsList\x{a}\x{a}This is a list of tools   that are currently ins...', 'TWiki=HASH(0x804d6d0)', 'Main', 'PandoraToolsList', 'TWiki::Meta=HASH(0x903b028)', 0) 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/UI/View.pm line 359 TWiki::UI::View::view('TWiki=HASH(0x804d6d0)') 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/UI.pm line 157 TWiki::UI::__ANON__() 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/CPAN/lib//Error.pm line 379 eval {...} 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/CPAN/lib//Error.pm line 371 Error::subs::try('CODE(0x804d5b0)', 'HASH(0x904f154)') 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/UI.pm line 197 TWiki::UI::run('CODE(0x809e7e4)', 'view', 1) 
called at /home/apache/www/htdocs/twiki-test/testboot/twiki4.1.1/bin/view line 31  No such DB pandora at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/Plugins/  DatabasePlugin.pm line 76. at /usr/local/.package/perl-5.8.8/lib/5.8.8/CGI/Carp.pm line 319 CGI::Carp::realdie('No such DB pandora at /proj/twiki/testing/testboot/  twiki4.1.1...') 
called at /usr/local/.package/perl-5.8.8/lib/5.8.8/CGI/Carp.pm line 396 CGI::Carp::die('No such DB pandora') 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/Plugins/DatabasePlugin.pm line 76 eval {...} 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/Plugins/DatabasePlugin.pm line 75 TWiki::Plugins::DatabasePlugin::_dispatch('DATABASE_EDIT',             'description="pandora" display_text="Edit the above table"') 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/Plugins/DatabasePlugin.pm line 97 TWiki::Plugins::DatabasePlugin::commonTagsHandler('---+!!              PandoraToolsList\x{a}\x{a}This is a list of tools that are curr...', 'PandoraToolsList', 'Main', 0) 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/Plugin.pm line 245 TWiki::Plugin::invoke('TWiki::Plugin=HASH(0x8d8df04)', 'commonTagsHandler', '---+!!   PandoraToolsList\x{a}\x{a}This is a list of tools that are curr...', 'PandoraToolsList', 'Main', 0)  
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/Plugins.pm line 333 TWiki::Plugins::_dispatch('TWiki::Plugins=HASH(0x88213c8)', 'commonTagsHandler',     '---+!!PandoraToolsList\x{a}\x{a}This is a list of tools that are curr...', 'PandoraToolsList', 'Main', 0)  
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/Plugins.pm line 470 TWiki::Plugins::commonTagsHandler('TWiki::Plugins=HASH(0x88213c8)', '---+!!          PandoraToolsList\x{a}\x{a}This is a list of tools that are curr...', 'PandoraToolsList', 'Main', 0) 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki.pm line 2596 TWiki::handleCommonTags('TWiki=HASH(0x804d6d0)', '---+!!PandoraToolsList\x{a}\x{a}This is a list of tools that are currently ins...', 'Main', 'PandoraToolsList') 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/UI/View.pm line 375 TWiki::UI::View::_prepare('---+!!PandoraToolsList\x{a}\x{a}This is a list of tools   that are currently ins...', 'TWiki=HASH(0x804d6d0)', 'Main', 'PandoraToolsList', 'TWiki::Meta=HASH(0x903b028)', 0) 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/UI/View.pm line 359 TWiki::UI::View::view('TWiki=HASH(0x804d6d0)') 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/UI.pm line 157 TWiki::UI::__ANON__() 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/CPAN/lib//Error.pm line 379 eval {...} 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/CPAN/lib//Error.pm line 371 Error::subs::try('CODE(0x804d5b0)', 'HASH(0x904f154)') 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/UI.pm line 197 TWiki::UI::run('CODE(0x809e7e4)', 'view', 1) 
called at /home/apache/www/htdocs/twiki-test/testboot/twiki4.1.1/bin/view line 31


And here's the output when DATABASE_REPEAT fails.


 No table defined in pandora at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/Plugins/DatabasePlugin/DATABASE_REPEAT.pm line 10. at /usr/local/.package/perl-5.8. 8/lib/5.8.8/CGI/Carp.pm line 319 CGI::Carp::realdie('No table defined in pandora at /proj/twiki/testing/testboot/t...') 
called at /usr/local/.package/perl-5.8.8/lib/5.8.8/CGI/Carp.pm line 396 CGI::Carp::die('No table defined in pandora') 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/Plugins/DatabasePlugin/DATABASE_REPEAT.pm line 10 TWiki::Plugins::DatabasePlugin::DATABASE_REPEAT::      handle('TWiki::Plugins::DatabasePlugin::Connection=HASH(0x8fe7b04)', 'description="pandora" columns="name,version,descrip,instdate"', '| [[http://www/twiki-test/    testboot/twiki4.1.1/bin/view/Mai...') 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/Plugins/DatabasePlugin.pm line 81 eval {...} 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/Plugins/DatabasePlugin.pm line 75 TWiki::Plugins::DatabasePlugin::_dispatch('DATABASE_REPEAT',           'description="pandora" columns="name,version,descrip,instdate"', '| [[http://www/twiki-test/testboot/twiki4.1.1/bin/view/Mai...') 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/Plugins/DatabasePlugin.pm line 95 TWiki::Plugins::DatabasePlugin::commonTagsHandler('---+!!              PandoraToolsList\x{a}\x{a}This is a list of tools that are curr...', 'PandoraToolsList', 'Main', 0) 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/Plugin.pm line 245 TWiki::Plugin::invoke('TWiki::Plugin=HASH(0x8d8e1b4)', 'commonTagsHandler', '---+!!   PandoraToolsList\x{a}\x{a}This is a list of tools that are curr...', 'PandoraToolsList', 'Main', 0) 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/Plugins.pm line 333 TWiki::Plugins::_dispatch('TWiki::Plugins=HASH(0x8821438)', 'commonTagsHandler',     '---+!!PandoraToolsList\x{a}\x{a}This is a list of tools that are curr...', 'PandoraToolsList', 'Main', 0) 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/Plugins.pm line 470 TWiki::Plugins::commonTagsHandler('TWiki::Plugins=HASH(0x8821438)', '---+!!          PandoraToolsList\x{a}\x{a}This is a list of tools that are curr...', 'PandoraToolsList', 'Main', 0) 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki.pm line 2596 TWiki::handleCommonTags('TWiki=HASH(0x804d6d0)', '---+!!PandoraToolsList\x{a}\x{a}This is a list of tools that are currently ins...', 'Main', 'PandoraToolsList') 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/UI/View.pm line 375 TWiki::UI::View::_prepare('---+!!PandoraToolsList\x{a}\x{a}This is a list of tools   that are currently ins...', 'TWiki=HASH(0x804d6d0)', 'Main', 'PandoraToolsList', 'TWiki::Meta=HASH(0x903b0b0)', 0) 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/UI/View.pm line 359 TWiki::UI::View::view('TWiki=HASH(0x804d6d0)') 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/UI.pm line 157 TWiki::UI::__ANON__() 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/CPAN/lib//Error.pm line 379 eval {...} 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/CPAN/lib//Error.pm line 371 Error::subs::try('CODE(0x804d5b0)', 'HASH(0x904f644)') 
called at /proj/twiki/testing/testboot/twiki4.1.1/lib/TWiki/UI.pm line 197 TWiki::UI::run('CODE(0x809e7e4)', 'view', 1) 
called at /home/apache/www/htdocs/twiki-test/testboot/twiki4.1.1/bin/view line 31    


-- TWiki:Main/TravisCampbell - 26 Oct 2007

ItemTemplate
Summary Configuration or documentation bugs with DatabasePlugin? description must match database name, and table_name should be table?
ReportedBy TWiki:Main.TravisCampbell
Codebase 4.1.1
SVN Range TWiki-4.3.0, Fri, 12 Oct 2007, build 15261
AppliesTo Extension
Component DatabasePlugin
Priority Normal
CurrentState New
WaitingFor

Checkins

TargetRelease n/a
Topic revision: r1 - 2007-10-26 - TravisCampbell
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback