Bug #1264

Error 500 in management of contents + patch

Added by Jonathan Démoutiez 88 days ago. Updated 68 days ago.

Status :New Start :09/04/2008
Priority :High Due date :
Assigned to :neuro - % Done :

0%

Category :admin
Target version :5.1.4
Resolution :


Description

On all pages of management of contents, i've this error :

NoMethodError (undefined method `[]' for #<Enumerable::Enumerator:0xb71764b8>):
    /vendor/rails/activerecord/lib/../../activesupport/lib/active_support/core_ext/string/access.rb:53:in `last'
    /lib/stateful.rb:21:in `method_missing'
    (__DELEGATION__):2:in `__send__'
    (__DELEGATION__):2:in `published?'
    /app/models/article.rb:319:in `allow_pings='
    /vendor/rails/activerecord/lib/../../activesupport/lib/active_support/core_ext/object/misc.rb:28:in `returning'
    /app/models/article.rb:317:in `allow_pings='
    /app/controllers/admin/content_controller.rb:232:in `get_or_build_article'
    /vendor/rails/activerecord/lib/../../activesupport/lib/active_support/core_ext/object/misc.rb:28:in `returning'
    /app/controllers/admin/content_controller.rb:230:in `get_or_build_article'
    /app/controllers/admin/content_controller.rb:155:in `new_or_edit'
    /app/controllers/admin/content_controller.rb:64:in `new'
    /vendor/rails/actionpack/lib/action_controller/base.rb:1159:in `send'
    /vendor/rails/actionpack/lib/action_controller/base.rb:1159:in `perform_action_without_filters'
    /vendor/rails/actionpack/lib/action_controller/filters.rb:699:in `call_filters'
    /vendor/rails/actionpack/lib/action_controller/filters.rb:727:in `run_before_filters'
    /vendor/rails/actionpack/lib/action_controller/filters.rb:666:in `call'
    /vendor/rails/actionpack/lib/action_controller/filters.rb:666:in `proxy_before_and_after_filter'
    /vendor/rails/actionpack/lib/action_controller/filters.rb:483:in `call'
    /vendor/rails/actionpack/lib/action_controller/filters.rb:483:in `call'
    /vendor/rails/actionpack/lib/action_controller/filters.rb:724:in `run_before_filters'
    /vendor/rails/actionpack/lib/action_controller/filters.rb:697:in `call_filters'
    /vendor/rails/actionpack/lib/action_controller/filters.rb:691:in `perform_action_without_benchmark'
    /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
    /usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
    /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
    /vendor/rails/actionpack/lib/action_controller/rescue.rb:199:in `perform_action_without_caching'
    /vendor/rails/actionpack/lib/action_controller/caching.rb:678:in `perform_action'
    /vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
    /vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in `cache'
    /vendor/rails/actionpack/lib/action_controller/caching.rb:677:in `perform_action'
    /vendor/rails/actionpack/lib/action_controller/base.rb:524:in `send'
    /vendor/rails/actionpack/lib/action_controller/base.rb:524:in `process_without_filters'
    /vendor/rails/actionpack/lib/action_controller/filters.rb:687:in `process_without_session_management_support'
    /vendor/rails/actionpack/lib/action_controller/session_management.rb:123:in `process'
    /vendor/rails/actionpack/lib/action_controller/base.rb:388:in `process'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:171:in `handle_request'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:115:in `dispatch'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:9:in `dispatch'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:76:in `process'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `synchronize'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `process'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:159:in `process_client'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in `each'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in `process_client'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `initialize'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `new'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `initialize'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `new'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:282:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `each'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
    /usr/bin/mongrel_rails:19:in `load'
    /usr/bin/mongrel_rails:19

I've add this code in 'model/article.rb' for patch this bug

def published?
  published
end

History

09/04/2008 12:13 PM - neuro -

  • Assigned to set to neuro -
  • Target version changed from 5.1 to 5.2

I take it.
When do you get this error ? Can't reproduce it on any of my production blog.

09/04/2008 02:35 PM - Jonathan Démoutiez

When i want manage my contents /admin/content or /admin/content/new

09/07/2008 10:30 AM - neuro -

  • Priority changed from Normal to High
  • Target version changed from 5.2 to 5.1.4
I can't reproduce it, can you be more precise please ?
  • Ruby version
  • Rails version
  • OS
  • Was it on an existing or new Typo ?

09/09/2008 10:47 AM - Stephen Sykes

I got the same thing, with the latest typo. It is due to attempting to run typo on Ruby 1.8.7. The included rails needs to be a later version than 2.0.2 for this to work.

09/25/2008 05:11 AM - Justin Hopkins

I had the same error, and was considering asking my host(a2hosting) to downgrade me to Ruby 1.8.6 - are there any drawbacks to either approach? Thanks for getting me up and running!

Also available in: Atom PDF