[Radiant] Error Creating New Page 0.91 ArgumentError (interning empty string):

2011-01-23 Thread Cleverlemming
Hail Caesars!

I received a 500 Internal Server Error when trying to create a new
page.  Looking through the stack trace, the problem turned out to be
that there was no default page.status set in Radiant::Config. I set it
back to draft and all is well again.

Maybe it makes sense to default to Draft in status.rb if no options
are passed to the intialize method? I

Hope this helps somebody.

Peace,
Pete

Processing Admin::PagesController#new (for 184.100.170.199 at
2011-01-24 00:29:11) [GET]
  Parameters: {page_class=Page, page_id=1, action=new,
controller=admin/pages}

ArgumentError (interning empty string):
  vendor/radiant/app/models/status.rb:14:in `intern'
  vendor/radiant/app/models/status.rb:14:in `[]'
  vendor/radiant/app/models/status.rb:14:in `each'
  vendor/radiant/app/models/status.rb:14:in `find'
  vendor/radiant/app/models/status.rb:14:in `[]'
  vendor/radiant/app/models/page.rb:274:in `new_with_defaults'
  /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/will_paginate-2.3.15/lib/
will_paginate/finder.rb:170:in `method_missing'
  vendor/radiant/app/controllers/admin/pages_controller.rb:21:in `new'
  compass (0.10.6) lib/compass/app_integration/rails/actionpack2/
action_controller.rb:7:in `process'
  vendor/radiant/vendor/plugins/haml/rails/./lib/sass/plugin/rack.rb:
41:in `call'
  passenger (3.0.1) lib/phusion_passenger/rack/request_handler.rb:
96:in `process_request'
  passenger (3.0.1) lib/phusion_passenger/abstract_request_handler.rb:
513:in `accept_and_process_next_request'
  passenger (3.0.1) lib/phusion_passenger/abstract_request_handler.rb:
274:in `main_loop'
  passenger (3.0.1) lib/phusion_passenger/classic_rails/
application_spawner.rb:321:in `start_request_handler'


Re: [Radiant] Error Creating New Page 0.91 ArgumentError (interning empty string):

2011-01-23 Thread William Ross
On 24 Jan 2011, at 06:32, Cleverlemming wrote:

 Hail Caesars!
 
 I received a 500 Internal Server Error when trying to create a new
 page.  Looking through the stack trace, the problem turned out to be
 that there was no default page.status set in Radiant::Config. I set it
 back to draft and all is well again.
 
 Maybe it makes sense to default to Draft in status.rb if no options
 are passed to the intialize method? I

As it happens, the next release will do exactly that as a side effect of the 
new configuration interface.

Thanks for the message, though: very useful.

best,

will




 
 Hope this helps somebody.
 
 Peace,
 Pete
 
 Processing Admin::PagesController#new (for 184.100.170.199 at
 2011-01-24 00:29:11) [GET]
  Parameters: {page_class=Page, page_id=1, action=new,
 controller=admin/pages}
 
 ArgumentError (interning empty string):
  vendor/radiant/app/models/status.rb:14:in `intern'
  vendor/radiant/app/models/status.rb:14:in `[]'
  vendor/radiant/app/models/status.rb:14:in `each'
  vendor/radiant/app/models/status.rb:14:in `find'
  vendor/radiant/app/models/status.rb:14:in `[]'
  vendor/radiant/app/models/page.rb:274:in `new_with_defaults'
  /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/will_paginate-2.3.15/lib/
 will_paginate/finder.rb:170:in `method_missing'
  vendor/radiant/app/controllers/admin/pages_controller.rb:21:in `new'
  compass (0.10.6) lib/compass/app_integration/rails/actionpack2/
 action_controller.rb:7:in `process'
  vendor/radiant/vendor/plugins/haml/rails/./lib/sass/plugin/rack.rb:
 41:in `call'
  passenger (3.0.1) lib/phusion_passenger/rack/request_handler.rb:
 96:in `process_request'
  passenger (3.0.1) lib/phusion_passenger/abstract_request_handler.rb:
 513:in `accept_and_process_next_request'
  passenger (3.0.1) lib/phusion_passenger/abstract_request_handler.rb:
 274:in `main_loop'
  passenger (3.0.1) lib/phusion_passenger/classic_rails/
 application_spawner.rb:321:in `start_request_handler'