I have instiki 0.10.1 configured with multiple webs on FreeBsd. It has been working fine for quite a while now. Unfortunately I was just editing a page and on saving received an error. From that point on I was unable to access that particular web - all of the others could be accessed fine. I copied the snapshot files to a local windows machine (with Instiki from svn) and tested on there. I get an error "undefined method `length'' for nil:NilClass" when clicking on the corrupt web. In addition, the web is opened in edit mode automatically. No changes can be made. I have copied the log file (when running on windows) at the bottom of the email. I removed the latest snapshot file and the corrupt web can be accessed correctly, so the corruption is only in the latest snapshot. Unfortunately the previous snapshot is four days old and so I would prefer it if somehow I could recover the information from the latest snapshot. The question is, I don''t really have a clue as to how I would about doing that..? Any help and advice would be much appreciated. Chris <logfile below this point> D:\_svn\instiki\trunk>instiki --storage=C:\TEMP\instiki => Starting Instiki on http://0.0.0.0:2500 => Data files are stored in C:\TEMP\instiki/2500 [2005-05-23 14:51:50] INFO WEBrick 1.3.1 [2005-05-23 14:51:50] INFO ruby 1.8.2 (2004-12-25) [i386-mswin32] [2005-05-23 14:51:50] INFO WEBrick::HTTPServer#start: pid=2544 port=2500 Processing WikiController#index (for 127.0.0.1 at Mon May 23 14:51:54 GMT Daylig ht Time 2005) Parameters: {"action"=>"index", "controller"=>"wiki"} Redirected to http://localhost:2500/web_list Completed in 0.01000 (100 reqs/sec) 127.0.0.1 - - [23/May/2005:14:51:53 GMT Daylight Time] "GET / HTTP/1.1" 302 96 - -> / Processing WikiController#web_list (for 127.0.0.1 at Mon May 23 14:51:55 GMT Day light Time 2005) Parameters: {"action"=>"web_list", "controller"=>"wiki"} Rendering wiki/web_list within layouts/default Rendering layouts/default (200 OK) Completed in 0.10000 (9 reqs/sec) | Rendering: 0.09000 (90%) 127.0.0.1 - - [23/May/2005:14:51:55 GMT Daylight Time] "GET /web_list HTTP/1.1" 200 2860 - -> /web_list Processing WikiController#show (for 127.0.0.1 at Mon May 23 14:51:59 GMT Dayligh t Time 2005) Parameters: {"action"=>"show", "id"=>"HomePage", "controller"=>"wiki", "web"=> "versitec"} Rendering wiki/page within layouts/default undefined method `length'' for nil:NilClass (ActionView::TemplateError) On line #81 of /wiki/page.rhtml 78: <% end %> 79: </small> 80: 81: <% unless @page.linked_from.empty? %> 82: <small> 83: | Linked from: 84: <%= @page.linked_from.collect { |referring_page| /RedCloth-3.0.3/lib/redcloth.rb:533:in `block_textile_lists'' /RedCloth-3.0.3/lib/redcloth.rb:522:in `each_with_index'' /RedCloth-3.0.3/lib/redcloth.rb:522:in `each'' /RedCloth-3.0.3/lib/redcloth.rb:522:in `each_with_index'' /RedCloth-3.0.3/lib/redcloth.rb:522:in `block_textile_lists'' /RedCloth-3.0.3/lib/redcloth.rb:518:in `gsub!'' /RedCloth-3.0.3/lib/redcloth.rb:518:in `block_textile_lists'' /RedCloth-3.0.3/lib/redcloth.rb:612:in `call'' /RedCloth-3.0.3/lib/redcloth.rb:612:in `blocks'' /RedCloth-3.0.3/lib/redcloth.rb:611:in `each'' /RedCloth-3.0.3/lib/redcloth.rb:611:in `blocks'' /RedCloth-3.0.3/lib/redcloth.rb:586:in `collect'' /RedCloth-3.0.3/lib/redcloth.rb:586:in `blocks'' /RedCloth-3.0.3/lib/redcloth.rb:288:in `to_html'' D:/_svn/instiki/trunk/app/models/chunks/engines.rb:34:in `mask'' D:/_svn/instiki/trunk/app/models/chunks/engines.rb:17:in `apply_to'' D:/_svn/instiki/trunk/app/models/wiki_content.rb:169:in `build_chunks'' D:/_svn/instiki/trunk/app/models/wiki_content.rb:147:in `initialize'' D:/_svn/instiki/trunk/app/models/revision.rb:80:in `new'' D:/_svn/instiki/trunk/app/models/revision.rb:80:in `display_content'' D:/_svn/instiki/trunk/app/models/revision.rb:58:in `wiki_words'' D:/_svn/instiki/trunk/app/models/page.rb:111:in `send'' D:/_svn/instiki/trunk/app/models/page.rb:111:in `method_missing'' D:/_svn/instiki/trunk/app/models/page_set.rb:39:in `pages_that_link_to'' D:/_svn/instiki/trunk/app/models/page_set.rb:39:in `select'' D:/_svn/instiki/trunk/app/models/page_set.rb:39:in `pages_that_link_to'' D:/_svn/instiki/trunk/app/models/page.rb:78:in `linked_from'' (erb):81:in `evaluate_locals'' /rails/actionpack/lib/action_view/base.rb:265:in `evaluate_locals'' /rails/actionpack/lib/action_view/base.rb:276:in `rhtml_render'' /rails/actionpack/lib/action_view/base.rb:201:in `send'' /rails/actionpack/lib/action_view/base.rb:201:in `render_template'' /rails/actionpack/lib/action_view/base.rb:181:in `render_file'' /rails/actionpack/lib/action_controller/layout.rb:208:in `render_without_ben chmark'' /rails/actionpack/lib/action_controller/benchmarking.rb:23:in `render'' /rails/actionpack/lib/action_controller/benchmarking.rb:23:in `measure'' /rails/actionpack/lib/action_controller/benchmarking.rb:23:in `render'' /rails/actionpack/lib/action_controller/base.rb:447:in `render_action'' D:/_svn/instiki/trunk/app/controllers/wiki_controller.rb:203:in `show'' /rails/actionpack/lib/action_controller/base.rb:708:in `send'' /rails/actionpack/lib/action_controller/base.rb:708:in `perform_action_witho ut_filters'' /rails/actionpack/lib/action_controller/filters.rb:294:in `perform_action_wi thout_benchmark'' /rails/actionpack/lib/action_controller/benchmarking.rb:34:in `perform_actio n_without_rescue'' /rails/actionpack/lib/action_controller/benchmarking.rb:34:in `measure'' /rails/actionpack/lib/action_controller/benchmarking.rb:34:in `perform_actio n_without_rescue'' /rails/actionpack/lib/action_controller/rescue.rb:79:in `perform_action'' /rails/actionpack/lib/action_controller/base.rb:330:in `send'' /rails/actionpack/lib/action_controller/base.rb:330:in `process'' /rails/actionpack/lib/action_controller/base.rb:273:in `process'' /rails/railties/lib/dispatcher.rb:32:in `dispatch'' D:/_svn/instiki/trunk/public/dispatch.rb:10 /rails/activesupport/lib/active_support/dependencies.rb:189:in `load'' /rails/activesupport/lib/active_support/dependencies.rb:189:in `load'' /rails/railties/lib/webrick_server.rb:82:in `handle_dispatch'' /rails/railties/lib/webrick_server.rb:35:in `service'' c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' c:/ruby/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'' c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'' c:/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each'' c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' /rails/railties/lib/webrick_server.rb:21:in `dispatch'' D:/_svn/instiki/trunk/script/server:92 D:/_svn/instiki/trunk/instiki.rb:3:in `load'' D:/_svn/instiki/trunk/instiki.rb:3 Redirected to http://localhost:2500/versitec/edit/HomePage Completed in 0.66000 (1 reqs/sec) 127.0.0.1 - - [23/May/2005:14:51:59 GMT Daylight Time] "GET /versitec/show/HomeP age HTTP/1.1" 302 110 http://localhost:2500/web_list -> /versitec/show/HomePage Processing WikiController#edit (for 127.0.0.1 at Mon May 23 14:51:59 GMT Dayligh t Time 2005) Parameters: {"action"=>"edit", "id"=>"HomePage", "controller"=>"wiki", "web"=> "versitec"} Rendering wiki/edit within layouts/default Rendering layouts/default (200 OK) Completed in 0.09000 (11 reqs/sec) | Rendering: 0.08000 (88%) 127.0.0.1 - - [23/May/2005:14:51:59 GMT Daylight Time] "GET /versitec/edit/HomeP age HTTP/1.1" 200 3960 http://localhost:2500/web_list -> /versitec/edit/HomePage
Chris I had this same thing happen to me after a user edit. What I did to save from having to revert back to an older snapshot was go into the command_log file in the storage directory and take out the last couple of entries. First make a straight backup of the whole storage directory, then edit the log file. However, when you do this, you need to do it in a binary editing mode so that the file does not get an EOF character attached, which will break the Madeleine processing of the object changes log upon startup of Instiki. Therefore, you should use something like: vim -b Which will edit the log in straight binary format. You can get a feel for where the entries break by looking for the @myidi field or something similar. The command log is essentially the object changes to the database since the last snapshot. Hopefully what will happen is that you will take out the last couple of Wiki entries causing the problem. Note that I don''t think this is a Madeline corruption issue, but something to do with bad markup that causes a blow out of the markdown system that goes all the way up the chain. In the bug reports database, I saw that a change was put in to keep such bad markup from blowing up the application all the way to the top, but I do not think that code change is in 0.10.1. Editing the command_log is not a good idea in general and just described here for emergency purposes. Tam?s On May 23, 2005, at 10:00 AM, Chris Roos wrote: I have instiki 0.10.1 configured with multiple webs on FreeBsd. It has been working fine for quite a while now. Unfortunately I was just editing a page and on saving received an error. From that point on I was unable to access that particular web - all of the others could be accessed fine. I copied the snapshot files to a local windows machine (with Instiki from svn) and tested on there. I get an error "undefined method `length'' for nil:NilClass" when clicking on the corrupt web. In addition, the web is opened in edit mode automatically. No changes can be made. I have copied the log file (when running on windows) at the bottom of the email. I removed the latest snapshot file and the corrupt web can be accessed correctly, so the corruption is only in the latest snapshot. Unfortunately the previous snapshot is four days old and so I would prefer it if somehow I could recover the information from the latest snapshot. The question is, I don''t really have a clue as to how I would about doing that..? Any help and advice would be much appreciated. Chris <logfile below this point> D:\_svn\instiki\trunk>instiki --storage=C:\TEMP\instiki => Starting Instiki on http://0.0.0.0:2500 => Data files are stored in C:\TEMP\instiki/2500 [2005-05-23 14:51:50] INFO WEBrick 1.3.1 [2005-05-23 14:51:50] INFO ruby 1.8.2 (2004-12-25) [i386-mswin32] [2005-05-23 14:51:50] INFO WEBrick::HTTPServer#start: pid=2544 port=2500 Processing WikiController#index (for 127.0.0.1 at Mon May 23 14:51:54 GMT Daylig ht Time 2005) Parameters: {"action"=>"index", "controller"=>"wiki"} Redirected to http://localhost:2500/web_list Completed in 0.01000 (100 reqs/sec) 127.0.0.1 - - [23/May/2005:14:51:53 GMT Daylight Time] "GET / HTTP/1.1" 302 96 - -> / Processing WikiController#web_list (for 127.0.0.1 at Mon May 23 14:51:55 GMT Day light Time 2005) Parameters: {"action"=>"web_list", "controller"=>"wiki"} Rendering wiki/web_list within layouts/default Rendering layouts/default (200 OK) Completed in 0.10000 (9 reqs/sec) | Rendering: 0.09000 (90%) 127.0.0.1 - - [23/May/2005:14:51:55 GMT Daylight Time] "GET /web_list HTTP/1.1" 200 2860 - -> /web_list Processing WikiController#show (for 127.0.0.1 at Mon May 23 14:51:59 GMT Dayligh t Time 2005) Parameters: {"action"=>"show", "id"=>"HomePage", "controller"=>"wiki", "web"=> "versitec"} Rendering wiki/page within layouts/default undefined method `length'' for nil:NilClass (ActionView::TemplateError) On line #81 of /wiki/page.rhtml 78: <% end %> 79: </small> 80: 81: <% unless @page.linked_from.empty? %> 82: <small> 83: | Linked from: 84: <%= @page.linked_from.collect { |referring_page| /RedCloth-3.0.3/lib/redcloth.rb:533:in `block_textile_lists'' /RedCloth-3.0.3/lib/redcloth.rb:522:in `each_with_index'' /RedCloth-3.0.3/lib/redcloth.rb:522:in `each'' /RedCloth-3.0.3/lib/redcloth.rb:522:in `each_with_index'' /RedCloth-3.0.3/lib/redcloth.rb:522:in `block_textile_lists'' /RedCloth-3.0.3/lib/redcloth.rb:518:in `gsub!'' /RedCloth-3.0.3/lib/redcloth.rb:518:in `block_textile_lists'' /RedCloth-3.0.3/lib/redcloth.rb:612:in `call'' /RedCloth-3.0.3/lib/redcloth.rb:612:in `blocks'' /RedCloth-3.0.3/lib/redcloth.rb:611:in `each'' /RedCloth-3.0.3/lib/redcloth.rb:611:in `blocks'' /RedCloth-3.0.3/lib/redcloth.rb:586:in `collect'' /RedCloth-3.0.3/lib/redcloth.rb:586:in `blocks'' /RedCloth-3.0.3/lib/redcloth.rb:288:in `to_html'' D:/_svn/instiki/trunk/app/models/chunks/engines.rb:34:in `mask'' D:/_svn/instiki/trunk/app/models/chunks/engines.rb:17:in `apply_to'' D:/_svn/instiki/trunk/app/models/wiki_content.rb:169:in `build_chunks'' D:/_svn/instiki/trunk/app/models/wiki_content.rb:147:in `initialize'' D:/_svn/instiki/trunk/app/models/revision.rb:80:in `new'' D:/_svn/instiki/trunk/app/models/revision.rb:80:in `display_content'' D:/_svn/instiki/trunk/app/models/revision.rb:58:in `wiki_words'' D:/_svn/instiki/trunk/app/models/page.rb:111:in `send'' D:/_svn/instiki/trunk/app/models/page.rb:111:in `method_missing'' D:/_svn/instiki/trunk/app/models/page_set.rb:39:in `pages_that_link_to'' D:/_svn/instiki/trunk/app/models/page_set.rb:39:in `select'' D:/_svn/instiki/trunk/app/models/page_set.rb:39:in `pages_that_link_to'' D:/_svn/instiki/trunk/app/models/page.rb:78:in `linked_from'' (erb):81:in `evaluate_locals'' /rails/actionpack/lib/action_view/base.rb:265:in `evaluate_locals'' /rails/actionpack/lib/action_view/base.rb:276:in `rhtml_render'' /rails/actionpack/lib/action_view/base.rb:201:in `send'' /rails/actionpack/lib/action_view/base.rb:201:in `render_template'' /rails/actionpack/lib/action_view/base.rb:181:in `render_file'' /rails/actionpack/lib/action_controller/layout.rb:208:in `render_without_ben chmark'' /rails/actionpack/lib/action_controller/benchmarking.rb:23:in `render'' /rails/actionpack/lib/action_controller/benchmarking.rb:23:in `measure'' /rails/actionpack/lib/action_controller/benchmarking.rb:23:in `render'' /rails/actionpack/lib/action_controller/base.rb:447:in `render_action'' D:/_svn/instiki/trunk/app/controllers/wiki_controller.rb:203:in `show'' /rails/actionpack/lib/action_controller/base.rb:708:in `send'' /rails/actionpack/lib/action_controller/base.rb:708:in `perform_action_witho ut_filters'' /rails/actionpack/lib/action_controller/filters.rb:294:in `perform_action_wi thout_benchmark'' /rails/actionpack/lib/action_controller/benchmarking.rb:34:in `perform_actio n_without_rescue'' /rails/actionpack/lib/action_controller/benchmarking.rb:34:in `measure'' /rails/actionpack/lib/action_controller/benchmarking.rb:34:in `perform_actio n_without_rescue'' /rails/actionpack/lib/action_controller/rescue.rb:79:in `perform_action'' /rails/actionpack/lib/action_controller/base.rb:330:in `send'' /rails/actionpack/lib/action_controller/base.rb:330:in `process'' /rails/actionpack/lib/action_controller/base.rb:273:in `process'' /rails/railties/lib/dispatcher.rb:32:in `dispatch'' D:/_svn/instiki/trunk/public/dispatch.rb:10 /rails/activesupport/lib/active_support/dependencies.rb:189:in `load'' /rails/activesupport/lib/active_support/dependencies.rb:189:in `load'' /rails/railties/lib/webrick_server.rb:82:in `handle_dispatch'' /rails/railties/lib/webrick_server.rb:35:in `service'' c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' c:/ruby/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'' c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'' c:/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each'' c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' /rails/railties/lib/webrick_server.rb:21:in `dispatch'' D:/_svn/instiki/trunk/script/server:92 D:/_svn/instiki/trunk/instiki.rb:3:in `load'' D:/_svn/instiki/trunk/instiki.rb:3 Redirected to http://localhost:2500/versitec/edit/HomePage Completed in 0.66000 (1 reqs/sec) 127.0.0.1 - - [23/May/2005:14:51:59 GMT Daylight Time] "GET /versitec/show/HomeP age HTTP/1.1" 302 110 http://localhost:2500/web_list -> /versitec/show/HomePage Processing WikiController#edit (for 127.0.0.1 at Mon May 23 14:51:59 GMT Dayligh t Time 2005) Parameters: {"action"=>"edit", "id"=>"HomePage", "controller"=>"wiki", "web"=> "versitec"} Rendering wiki/edit within layouts/default Rendering layouts/default (200 OK) Completed in 0.09000 (11 reqs/sec) | Rendering: 0.08000 (88%) 127.0.0.1 - - [23/May/2005:14:51:59 GMT Daylight Time] "GET /versitec/edit/HomeP age HTTP/1.1" 200 3960 http://localhost:2500/web_list -> /versitec/edit/HomePage _______________________________________________ Instiki-users mailing list Instiki-users@rubyforge.org http://rubyforge.org/mailman/listinfo/instiki-users
Chris Roos wrote:> I have instiki 0.10.1 configured with multiple webs on FreeBsd. It > has been working fine for quite a while now. Unfortunately I was just > editing a page and on saving received an error. From that point on I > was unable to access that particular web - all of the others could be > accessed fine. > > I copied the snapshot files to a local windows machine (with Instiki > from svn) and tested on there. I get an error "undefined method > `length'' for nil:NilClass" when clicking on the corrupt web. In > addition, the web is opened in edit mode automatically. No changes > can be made. I have copied the log file (when running on windows) at > the bottom of the email. > > I removed the latest snapshot file and the corrupt web can be accessed > correctly, so the corruption is only in the latest snapshot. > Unfortunately the previous snapshot is four days old and so I would > prefer it if somehow I could recover the information from the latest > snapshot. The question is, I don''t really have a clue as to how I > would about doing that..? > > Any help and advice would be much appreciated.One oif these days I will write some thing to enable users poke in the Madeleine storage and save their results. Until then, please email me your last snapshot and tell me the name of the page that you edited. -- Best regards, Alexey Verkhovsky Ruby Forum: http://ruby-forum.org (moderator) RForum: http://rforum.andreas-s.net (co-author) Instiki: http://instiki.org (maintainer)
Thanks for the advice Tamas but unfortunately my storage directory didn''t have any .command_log files (I just extracted the backup, that I did as soon as I saw the problem, to double check). I''m going to send my .snapshot file to Alexey, as per his reply to this same thread, and see if he can work some magic. Chris Tam?s Smith wrote:> Chris > > I had this same thing happen to me after a user edit. What I did to > save from having to revert back to an older snapshot was go into the > command_log file in the storage directory and take out the last couple > of entries. First make a straight backup of the whole storage > directory, then edit the log file. However, when you do this, you need > to do it in a binary editing mode so that the file does not get an EOF > character attached, which will break the Madeleine processing of the > object changes log upon startup of Instiki. Therefore, you should use > something like: > > vim -b > > Which will edit the log in straight binary format. You can get a feel > for where the entries break by looking for the @myidi field or something > similar. The command log is essentially the object changes to the > database since the last snapshot. Hopefully what will happen is that you > will take out the last couple of Wiki entries causing the problem. > > Note that I don''t think this is a Madeline corruption issue, but > something to do with bad markup that causes a blow out of the markdown > system that goes all the way up the chain. In the bug reports database, > I saw that a change was put in to keep such bad markup from blowing up > the application all the way to the top, but I do not think that code > change is in 0.10.1. > > Editing the command_log is not a good idea in general and just > described here for emergency purposes. > > Tam?s > > > On May 23, 2005, at 10:00 AM, Chris Roos wrote: > > I have instiki 0.10.1 configured with multiple webs on FreeBsd. It has > been working fine for quite a while now. Unfortunately I was just > editing a page and on saving received an error. From that point on I > was unable to access that particular web - all of the others could be > accessed fine. > > I copied the snapshot files to a local windows machine (with Instiki > from svn) and tested on there. I get an error "undefined method > `length'' for nil:NilClass" when clicking on the corrupt web. In > addition, the web is opened in edit mode automatically. No changes can > be made. I have copied the log file (when running on windows) at the > bottom of the email. > > I removed the latest snapshot file and the corrupt web can be accessed > correctly, so the corruption is only in the latest snapshot. > Unfortunately the previous snapshot is four days old and so I would > prefer it if somehow I could recover the information from the latest > snapshot. The question is, I don''t really have a clue as to how I would > about doing that..? > > Any help and advice would be much appreciated. > > Chris > > <logfile below this point> > > D:\_svn\instiki\trunk>instiki --storage=C:\TEMP\instiki > => Starting Instiki on http://0.0.0.0:2500 > => Data files are stored in C:\TEMP\instiki/2500 > [2005-05-23 14:51:50] INFO WEBrick 1.3.1 > [2005-05-23 14:51:50] INFO ruby 1.8.2 (2004-12-25) [i386-mswin32] > [2005-05-23 14:51:50] INFO WEBrick::HTTPServer#start: pid=2544 port=2500 > > > Processing WikiController#index (for 127.0.0.1 at Mon May 23 14:51:54 > GMT Daylig > ht Time 2005) > Parameters: {"action"=>"index", "controller"=>"wiki"} > Redirected to http://localhost:2500/web_list > Completed in 0.01000 (100 reqs/sec) > 127.0.0.1 - - [23/May/2005:14:51:53 GMT Daylight Time] "GET / HTTP/1.1" > 302 96 > - -> / > > > Processing WikiController#web_list (for 127.0.0.1 at Mon May 23 14:51:55 > GMT Day > light Time 2005) > Parameters: {"action"=>"web_list", "controller"=>"wiki"} > Rendering wiki/web_list within layouts/default > Rendering layouts/default (200 OK) > Completed in 0.10000 (9 reqs/sec) | Rendering: 0.09000 (90%) > 127.0.0.1 - - [23/May/2005:14:51:55 GMT Daylight Time] "GET /web_list > HTTP/1.1" > 200 2860 > - -> /web_list > > > Processing WikiController#show (for 127.0.0.1 at Mon May 23 14:51:59 GMT > Dayligh > t Time 2005) > Parameters: {"action"=>"show", "id"=>"HomePage", "controller"=>"wiki", > "web"=> > "versitec"} > Rendering wiki/page within layouts/default > undefined method `length'' for nil:NilClass (ActionView::TemplateError) > On line #81 of /wiki/page.rhtml > > 78: <% end %> > 79: </small> > 80: > 81: <% unless @page.linked_from.empty? %> > 82: <small> > 83: | Linked from: > 84: <%= @page.linked_from.collect { |referring_page| > > /RedCloth-3.0.3/lib/redcloth.rb:533:in `block_textile_lists'' > /RedCloth-3.0.3/lib/redcloth.rb:522:in `each_with_index'' > /RedCloth-3.0.3/lib/redcloth.rb:522:in `each'' > /RedCloth-3.0.3/lib/redcloth.rb:522:in `each_with_index'' > /RedCloth-3.0.3/lib/redcloth.rb:522:in `block_textile_lists'' > /RedCloth-3.0.3/lib/redcloth.rb:518:in `gsub!'' > /RedCloth-3.0.3/lib/redcloth.rb:518:in `block_textile_lists'' > /RedCloth-3.0.3/lib/redcloth.rb:612:in `call'' > /RedCloth-3.0.3/lib/redcloth.rb:612:in `blocks'' > /RedCloth-3.0.3/lib/redcloth.rb:611:in `each'' > /RedCloth-3.0.3/lib/redcloth.rb:611:in `blocks'' > /RedCloth-3.0.3/lib/redcloth.rb:586:in `collect'' > /RedCloth-3.0.3/lib/redcloth.rb:586:in `blocks'' > /RedCloth-3.0.3/lib/redcloth.rb:288:in `to_html'' > D:/_svn/instiki/trunk/app/models/chunks/engines.rb:34:in `mask'' > D:/_svn/instiki/trunk/app/models/chunks/engines.rb:17:in `apply_to'' > D:/_svn/instiki/trunk/app/models/wiki_content.rb:169:in `build_chunks'' > D:/_svn/instiki/trunk/app/models/wiki_content.rb:147:in `initialize'' > D:/_svn/instiki/trunk/app/models/revision.rb:80:in `new'' > D:/_svn/instiki/trunk/app/models/revision.rb:80:in `display_content'' > D:/_svn/instiki/trunk/app/models/revision.rb:58:in `wiki_words'' > D:/_svn/instiki/trunk/app/models/page.rb:111:in `send'' > D:/_svn/instiki/trunk/app/models/page.rb:111:in `method_missing'' > D:/_svn/instiki/trunk/app/models/page_set.rb:39:in `pages_that_link_to'' > D:/_svn/instiki/trunk/app/models/page_set.rb:39:in `select'' > D:/_svn/instiki/trunk/app/models/page_set.rb:39:in `pages_that_link_to'' > D:/_svn/instiki/trunk/app/models/page.rb:78:in `linked_from'' > (erb):81:in `evaluate_locals'' > /rails/actionpack/lib/action_view/base.rb:265:in `evaluate_locals'' > /rails/actionpack/lib/action_view/base.rb:276:in `rhtml_render'' > /rails/actionpack/lib/action_view/base.rb:201:in `send'' > /rails/actionpack/lib/action_view/base.rb:201:in `render_template'' > /rails/actionpack/lib/action_view/base.rb:181:in `render_file'' > /rails/actionpack/lib/action_controller/layout.rb:208:in > `render_without_ben > chmark'' > /rails/actionpack/lib/action_controller/benchmarking.rb:23:in `render'' > /rails/actionpack/lib/action_controller/benchmarking.rb:23:in `measure'' > /rails/actionpack/lib/action_controller/benchmarking.rb:23:in `render'' > /rails/actionpack/lib/action_controller/base.rb:447:in `render_action'' > D:/_svn/instiki/trunk/app/controllers/wiki_controller.rb:203:in `show'' > /rails/actionpack/lib/action_controller/base.rb:708:in `send'' > /rails/actionpack/lib/action_controller/base.rb:708:in > `perform_action_witho > ut_filters'' > /rails/actionpack/lib/action_controller/filters.rb:294:in > `perform_action_wi > thout_benchmark'' > /rails/actionpack/lib/action_controller/benchmarking.rb:34:in > `perform_actio > n_without_rescue'' > /rails/actionpack/lib/action_controller/benchmarking.rb:34:in `measure'' > /rails/actionpack/lib/action_controller/benchmarking.rb:34:in > `perform_actio > n_without_rescue'' > /rails/actionpack/lib/action_controller/rescue.rb:79:in > `perform_action'' > /rails/actionpack/lib/action_controller/base.rb:330:in `send'' > /rails/actionpack/lib/action_controller/base.rb:330:in `process'' > /rails/actionpack/lib/action_controller/base.rb:273:in `process'' > /rails/railties/lib/dispatcher.rb:32:in `dispatch'' > D:/_svn/instiki/trunk/public/dispatch.rb:10 > /rails/activesupport/lib/active_support/dependencies.rb:189:in `load'' > /rails/activesupport/lib/active_support/dependencies.rb:189:in `load'' > /rails/railties/lib/webrick_server.rb:82:in `handle_dispatch'' > /rails/railties/lib/webrick_server.rb:35:in `service'' > c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' > c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' > /rails/railties/lib/webrick_server.rb:21:in `dispatch'' > D:/_svn/instiki/trunk/script/server:92 > D:/_svn/instiki/trunk/instiki.rb:3:in `load'' > D:/_svn/instiki/trunk/instiki.rb:3 > Redirected to http://localhost:2500/versitec/edit/HomePage > Completed in 0.66000 (1 reqs/sec) > 127.0.0.1 - - [23/May/2005:14:51:59 GMT Daylight Time] "GET > /versitec/show/HomeP > age HTTP/1.1" 302 110 > http://localhost:2500/web_list -> /versitec/show/HomePage > > > Processing WikiController#edit (for 127.0.0.1 at Mon May 23 14:51:59 GMT > Dayligh > t Time 2005) > Parameters: {"action"=>"edit", "id"=>"HomePage", "controller"=>"wiki", > "web"=> > "versitec"} > Rendering wiki/edit within layouts/default > Rendering layouts/default (200 OK) > Completed in 0.09000 (11 reqs/sec) | Rendering: 0.08000 (88%) > 127.0.0.1 - - [23/May/2005:14:51:59 GMT Daylight Time] "GET > /versitec/edit/HomeP > age HTTP/1.1" 200 3960 > http://localhost:2500/web_list -> /versitec/edit/HomePage > > _______________________________________________ > Instiki-users mailing list > Instiki-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/instiki-users > > > _______________________________________________ > Instiki-users mailing list > Instiki-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/instiki-users > >
Alexey Verkhovsky wrote:> Chris Roos wrote: > >> I have instiki 0.10.1 configured with multiple webs on FreeBsd. It >> has been working fine for quite a while now. Unfortunately I was just >> editing a page and on saving received an error. From that point on I >> was unable to access that particular web - all of the others could be >> accessed fine. >> >> I copied the snapshot files to a local windows machine (with Instiki >> from svn) and tested on there. I get an error "undefined method >> `length'' for nil:NilClass" when clicking on the corrupt web. In >> addition, the web is opened in edit mode automatically. No changes >> can be made. I have copied the log file (when running on windows) at >> the bottom of the email. >> >> I removed the latest snapshot file and the corrupt web can be accessed >> correctly, so the corruption is only in the latest snapshot. >> Unfortunately the previous snapshot is four days old and so I would >> prefer it if somehow I could recover the information from the latest >> snapshot. The question is, I don''t really have a clue as to how I >> would about doing that..? >> >> Any help and advice would be much appreciated. > > > One oif these days I will write some thing to enable users poke in the > Madeleine storage and save their results. Until then, please email me > your last snapshot and tell me the name of the page that you edited. >Before I send you the .snapshot file I wanted to say that I can''t remember which page it would have been that I was editing. Is it (relatively) easy for you to spot corruption in a page or would it be a case of manually looking into each page to check for malformed html (which I''m led to believe is the cause of the problem from Tamas)? In addition do you have any pointers as to how one would go about replicating the procedure that you will use to attempt to retrieve a corrupt snapshot file? Maybe this is something I could take a stab at myself. I realise that I could just find this out myself by digging into the code but if you have any pointers then it makes that process a lot easier ;-) Thanks in advance, Chris
> > I copied the snapshot files to a local windows machine (with Instiki > > from svn) and tested on there. I get an error "undefined method > > `length'' for nil:NilClass" when clicking on the corrupt web. In > > addition,I too have seen this exact same thing, yesterday I was doing a lot of work with nested lists and indented paragraphs under a list item etc and got a rails application error followed by the above length thing several times. To fix it all I had to do was hit back in the browser to get back to the edit screen for the last page I touched and remove the edit [usually either a div or blank line between items] and re-save. All was then fine. Not much help for you at the moment I know but maybe worth trying if it happens to you again. My guess would be that it is a bug in the Textile parsing -- annoying for me as it means my formatting does not work on indent paras under a list item -- but only sometimes Ah, not sure if it is relevant or not but I am running version 0.10, ruby 1.8.2 and latest gems under freebsd Huw
Chris Roos wrote:> Before I send you the .snapshot file I wanted to say that I can''t > remember which page it would have been that I was editing. Is it > (relatively) easy for you to spot corruption in a page or would it be > a case of manually looking into each page to check for malformed html > (which I''m led to believe is the cause of the problem from Tamas)?No, it is easy. -- Best regards, Alexey Verkhovsky Ruby Forum: http://ruby-forum.org (moderator) RForum: http://rforum.andreas-s.net (co-author) Instiki: http://instiki.org (maintainer)
Huw wrote:>To fix it all I had to do was hit back in the browser to get back to >the edit screen for the last page >Or you can type in the edit URL manually. -- Best regards, Alexey Verkhovsky Ruby Forum: http://ruby-forum.org (moderator) RForum: http://rforum.andreas-s.net (co-author) Instiki: http://instiki.org (maintainer)
Alexey Verkhovsky wrote:> Chris Roos wrote: > >> Before I send you the .snapshot file I wanted to say that I can''t >> remember which page it would have been that I was editing. Is it >> (relatively) easy for you to spot corruption in a page or would it be >> a case of manually looking into each page to check for malformed html >> (which I''m led to believe is the cause of the problem from Tamas)? > > > No, it is easy. >Cool. I''ve replied off list with the snapshot file. Cheers, Chris
Huw et al I will note that the time I got this similar bug, which is reported in the bug tracking system as bug 161, a user was also using complex list and paragraph indentations. Btw, Alexey, I emailed you the snapshot for that bug and made a comment on the bug to that affect, though I may have labeled it incorrectly as pertaining to bug 163, sorry. Tam?s On May 26, 2005, at 8:29 AM, Huw wrote:>> I copied the snapshot files to a local windows machine (with Instiki >> from svn) and tested on there. I get an error "undefined method >> `length'' for nil:NilClass" when clicking on the corrupt web. In >> addition,I too have seen this exact same thing, yesterday I was doing a lot of work with nested lists and indented paragraphs under a list item etc and got a rails application error followed by the above length thing several times. To fix it all I had to do was hit back in the browser to get back to the edit screen for the last page I touched and remove the edit [usually either a div or blank line between items] and re-save. All was then fine. Not much help for you at the moment I know but maybe worth trying if it happens to you again. My guess would be that it is a bug in the Textile parsing -- annoying for me as it means my formatting does not work on indent paras under a list item -- but only sometimes Ah, not sure if it is relevant or not but I am running version 0.10, ruby 1.8.2 and latest gems under freebsd Huw _______________________________________________ Instiki-users mailing list Instiki-users@rubyforge.org http://rubyforge.org/mailman/listinfo/instiki-users
> I will note that the time I got this similar bug, which is reported in > the bug tracking system as bug 161, a user was also using complex list > and paragraph indentations.Yes it does seem that the more complex but at the same time perfectly valid formatting is prone to throw a fit from time to time. I have also had numerous problems when editing pages with html markup, as for a side bar etc. It seems really east to mess up. All that said I have yet to find anything that comes close to the speed and ease of use that we have here :) Huw -- TTFN H
Does anyone currently have the definite cause for this problem? Is the cause definitely pointing to redcloth or could it still be something in instiki? All I''m thinking is that if we can come up with an example of a page that causes the error we can add it to the tests that are bundled with redcloth. Any thoughts? Chris Tam?s Smith wrote:> Huw et al > > I will note that the time I got this similar bug, which is reported in > the bug tracking system as bug 161, a user was also using complex list > and paragraph indentations. Btw, Alexey, I emailed you the snapshot for > that bug and made a comment on the bug to that affect, though I may have > labeled it incorrectly as pertaining to bug 163, sorry. > > Tam?s > > > On May 26, 2005, at 8:29 AM, Huw wrote: > >>> I copied the snapshot files to a local windows machine (with Instiki >>> from svn) and tested on there. I get an error "undefined method >>> `length'' for nil:NilClass" when clicking on the corrupt web. In >>> addition, > > > I too have seen this exact same thing, yesterday I was doing a lot of > work with nested lists and indented paragraphs under a list item etc > and got a rails application error followed by the above length thing > several times. > > To fix it all I had to do was hit back in the browser to get back to > the edit screen for the last page I touched and remove the edit > [usually either a div or blank line between items] and re-save. All > was then fine. > > Not much help for you at the moment I know but maybe worth trying if > it happens to you again. > > My guess would be that it is a bug in the Textile parsing -- annoying > for me as it means my formatting does not work on indent paras under a > list item -- but only sometimes > > Ah, not sure if it is relevant or not but I am running version 0.10, > ruby 1.8.2 and latest gems under freebsd > > Huw > > _______________________________________________ > Instiki-users mailing list > Instiki-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/instiki-users > > > _______________________________________________ > Instiki-users mailing list > Instiki-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/instiki-users > >
I''ve just been doing some investigation. I can reliably reproduce the following error in Instiki 0.10.1 on Windows XP with Rails 0.12.1 and Firefox 1.0.4. "NoMethodError in Wiki#save" "undefined method `length'' for nil:NilClass" If we don''t go back and edit the change that caused this problem and then try to re-visit the wiki we get the following error. "Redirection limit for this URL exceeded. Unable to load the requested page. This may be caused by cookies that are blocked." All we need to do is create a list where there are more indentations at the top than the bottom. For example, creating any of these lists will cause the error. ### three deep ## two deep ##### five deep # one deep ** two deep * one deep **** four deep *** three deep However, if we duplicate the bottom line in each case at the top of the list then all works fine, e.g. *** three deep **** four deep *** three deep We can trace the problem to RedCloth by emulating what instiki will do in irb. require ''redcloth'' r = RedCloth.new("** two deep\r\n* one deep") r.to_html => returns the undefined method length for nil:NilClass error. This doesn''t appear as a problem in the actual Textile online implementation at http://www.textism.com/tools/textile/, i.e. putting ** two deep * one deep doesn''t error but returns the following (albeit not well formed) html. <ul> <li>two deep</li> </ul> </li> <ul> <li>one deep</li> </ul> I''d appreciate if someone could confirm this to be true and then I guess we contact _why (I''m pretty sure RedCloth is one of his). Chris Chris Roos wrote:> Does anyone currently have the definite cause for this problem? Is the > cause definitely pointing to redcloth or could it still be something in > instiki? All I''m thinking is that if we can come up with an example of > a page that causes the error we can add it to the tests that are bundled > with redcloth. > > Any thoughts? > > Chris > > Tam?s Smith wrote: > >> Huw et al >> >> I will note that the time I got this similar bug, which is reported in >> the bug tracking system as bug 161, a user was also using complex list >> and paragraph indentations. Btw, Alexey, I emailed you the snapshot >> for that bug and made a comment on the bug to that affect, though I >> may have labeled it incorrectly as pertaining to bug 163, sorry. >> >> Tam?s >> >> >> On May 26, 2005, at 8:29 AM, Huw wrote: >> >>>> I copied the snapshot files to a local windows machine (with Instiki >>>> from svn) and tested on there. I get an error "undefined method >>>> `length'' for nil:NilClass" when clicking on the corrupt web. In >>>> addition, >> >> >> >> I too have seen this exact same thing, yesterday I was doing a lot of >> work with nested lists and indented paragraphs under a list item etc >> and got a rails application error followed by the above length thing >> several times. >> >> To fix it all I had to do was hit back in the browser to get back to >> the edit screen for the last page I touched and remove the edit >> [usually either a div or blank line between items] and re-save. All >> was then fine. >> >> Not much help for you at the moment I know but maybe worth trying if >> it happens to you again. >> >> My guess would be that it is a bug in the Textile parsing -- annoying >> for me as it means my formatting does not work on indent paras under a >> list item -- but only sometimes >> >> Ah, not sure if it is relevant or not but I am running version 0.10, >> ruby 1.8.2 and latest gems under freebsd >> >> Huw >> >> _______________________________________________ >> Instiki-users mailing list >> Instiki-users@rubyforge.org >> http://rubyforge.org/mailman/listinfo/instiki-users >> >> >> _______________________________________________ >> Instiki-users mailing list >> Instiki-users@rubyforge.org >> http://rubyforge.org/mailman/listinfo/instiki-users >> >> > > > _______________________________________________ > Instiki-users mailing list > Instiki-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/instiki-users > >
That sounds like you may have hit it, As I said before, I often get this sort of error but have not had the time to look into it properly, I will go check some of my pages that give problems and report back BTW: Thanks for putting in the effort to get us started:) Regards H> I''ve just been doing some investigation. I can reliably reproduce the > following error in Instiki 0.10.1 on Windows XP with Rails 0.12.1 and > Firefox 1.0.4. > > "NoMethodError in Wiki#save" > "undefined method `length'' for nil:NilClass" > > If we don''t go back and edit the change that caused this problem and > then try to re-visit the wiki we get the following error. > > "Redirection limit for this URL exceeded. Unable to load the requested > page. This may be caused by cookies that are blocked." > > All we need to do is create a list where there are more indentations at > the top than the bottom. For example, creating any of these lists will > cause the error. > > ### three deep > ## two deep<snip>
Chris Roos wrote:> I''ve just been doing some investigation. I can reliably reproduce the > following error in Instiki 0.10.1 on Windows XP with Rails 0.12.1 and > Firefox 1.0.4. > > "Redirection limit for this URL exceeded. Unable to load the > requested page. This may be caused by cookies that are blocked."There are two factors at play here. One is a RedCloth bug that causes RedCloth to raise an error while trying to parse this markup. That''s something worth reporting in RedCloth tracker. The other is how Instiki 0.10.1 handles the situation ("Redirection limit..." etc). This is "fixed in Subversion trunk" (TM) -- Best regards, Alexey Verkhovsky Ruby Forum: http://ruby-forum.org (moderator) RForum: http://rforum.andreas-s.net (co-author) Instiki: http://instiki.org (maintainer)
Alexey Verkhovsky wrote:> > There are two factors at play here. One is a RedCloth bug that causes > RedCloth to raise an error while trying to parse this markup. That''s > something worth reporting in RedCloth tracker. >Just so that this is closed properly if you like, having checked the RedCloth issue tracker, this bug has already been reported in #577.
Chris Roos wrote:> Alexey Verkhovsky wrote: > >> Chris Roos wrote: >> >>> Before I send you the .snapshot file I wanted to say that I can''t >>> remember which page it would have been that I was editing. Is it >>> (relatively) easy for you to spot corruption in a page or would it be >>> a case of manually looking into each page to check for malformed html >>> (which I''m led to believe is the cause of the problem from Tamas)? >> >> >> >> No, it is easy. >> > Cool. I''ve replied off list with the snapshot file. >Big thanks to Alexey for fixing the problem for me. Cheers, Chris