Feature #2147
closed500 error in Page_index/special
0%
Description
whs@WHSServer1:/var/redmine$ svn info
Path: .
URL: http://redmine.rubyforge.org/svn/trunk
Repository Root: http://redmine.rubyforge.org/svn
Repository UUID: e93f8b46-1217-0410-a6f0-8f06a7374b81
Revision: 1991
Node Kind: directory
Schedule: normal
Last Changed Author: edavis10
Last Changed Rev: 1991
Last Changed Date: 2008-11-08 07:12:43 +0700 (Sat, 08 Nov 2008)
whs@WHSServer1:/var/redmine$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 16969
Server version: 5.0.67-0ubuntu6 (Ubuntu)
whs@WHSServer1:/var/redmine$ ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
whs@WHSServer1:/var/redmine$ mongrel_rails --version
Mongrel Web Server 1.1.5
whs@WHSServer1:/var/redmine$ rails -v
Rails 2.1.2
Processing WikiController#special (for 124.120.83.65 at 2008-11-08 16:31:29) [GET]
Session ID: 8d7e38138a0467706dd25f3ccbf39e98
Parameters: {"action"=>"special", "id"=>"willwillbot", "page"=>"Page_index", "controller"=>"wiki"}
NoMethodError (undefined method `to_date' for nil:NilClass):
/app/controllers/wiki_controller.rb:156:in `special'
/var/lib/gems/1.8/gems/activesupport-2.1.2/lib/active_support/core_ext/enumerable.rb:22:in `group_by'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/base.rb:1912:in `inject'
/var/lib/gems/1.8/gems/activesupport-2.1.2/lib/active_support/core_ext/enumerable.rb:21:in `each'
/var/lib/gems/1.8/gems/activesupport-2.1.2/lib/active_support/core_ext/enumerable.rb:21:in `inject'
/var/lib/gems/1.8/gems/activesupport-2.1.2/lib/active_support/core_ext/enumerable.rb:21:in `group_by'
/app/controllers/wiki_controller.rb:156:in `special'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/base.rb:1166:in `send'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/base.rb:1166:in `perform_action_without_filters'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/filters.rb:579:in `call_filters'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/filters.rb:572:in `perform_action_without_benchmark'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/rescue.rb:201:in `perform_action_without_caching'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/caching/sql_cache.rb:13:in `perform_action'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
/var/lib/gems/1.8/gems/activerecord-2.1.2/lib/active_record/query_cache.rb:8:in `cache'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/caching/sql_cache.rb:12:in `perform_action'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/base.rb:529:in `send'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/base.rb:529:in `process_without_filters'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/filters.rb:568:in `process_without_session_management_support'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/session_management.rb:130:in `process'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/base.rb:389:in `process'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:149:in `handle_request'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:107:in `dispatch'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:104:in `synchronize'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:104:in `dispatch'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:120:in `dispatch_cgi'
/var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:35:in `dispatch'
/var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:76:in `process'
/var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `synchronize'
/var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `process'
/var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:159:in `process_client'
/var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in `each'
/var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in `process_client'
/var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `initialize'
/var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `new'
/var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `initialize'
/var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `new'
/var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:282:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `each'
/var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run'
/var/lib/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
/usr/bin/mongrel_rails:19:in `load'
/usr/bin/mongrel_rails:19
Rendering /var/redmine/public/500.html (500 Internal Server Error)
The data in the wiki is manually inserted by this Python code
def createPage(title, content): c = db.cursor() c.execute("SELECT id, protected FROM wiki_pages WHERE title = %s", (title,)) pID = c.fetchone() if pID: if pID[1]: return c pID = pID[0] c.execute("UPDATE `wiki_contents` SET `author_id`=%s, `text`=%s, `updated_on`=%s WHERE `page_id`=%s;", (_botID, content, datetime.datetime.now(), int(pID))) db.commit() return c c.execute("INSERT INTO `wiki_pages` (`wiki_id` , `title`, `created_on`) VALUES (%s, %s, %s);", (_id, title, datetime.datetime.now())) c.execute("SELECT id FROM wiki_pages WHERE title = %s", (title,)) pID = c.fetchone()[0] c.execute("INSERT INTO `wiki_contents` (`page_id` , `author_id`, `text`, `updated_on`) VALUES (%s, %s, %s, %s);", (pID, _botID, content, datetime.datetime.now())) db.commit() return c
The normal wiki(i.e. all data is created from the Redmine itself) have no problem. So, I think redmine page list should just list the page only from wiki_pages so it can easily integrated to websites(or in my case, IRC bot).