InvalidAuthenticityToken when edit

0 views
Skip to first unread message

hsun

unread,
Jan 9, 2008, 2:48:38โ€ฏAM1/9/08
to Streamlined
I'm using the edge version of streamlined, rails 2.0.2

I manage to setup everything and call mongrel to run (with the edge
version of streamlined), for some reason the stable version i download
has a error when running on it.

Then i create a new User (assume User is the table i have)

After that, there is an Edit link.

When i click the Edit link

The error is like this:

ActionController::InvalidAuthenticityToken in UserController#edit

ActionController::InvalidAuthenticityToken

RAILS_ROOT: D:/resource/IJS/work/indomulti
Application Trace | Framework Trace | Full Trace

c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
request_forgery_protection.rb:79:in `verify_authenticity_token'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
filters.rb:469:in `send!'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
filters.rb:469:in `call'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
filters.rb:441:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
filters.rb:716:in `run_before_filters'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
filters.rb:695:in `call_filters'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
filters.rb:689:in `perform_action_without_benchmark'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
benchmarking.rb:68:in `perform_action_without_rescue'
c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
benchmarking.rb:68:in `perform_action_without_rescue'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
rescue.rb:199:in `perform_action_without_caching'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
caching.rb:678:in `perform_action'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/abstract/query_cache.rb:33:in `cache'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
query_cache.rb:8:in `cache'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
caching.rb:677:in `perform_action'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
base.rb:524:in `send'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
base.rb:524:in `process_without_filters'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
filters.rb:685:in `process_without_session_management_support'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
session_management.rb:123:in `process'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
base.rb:388:in `process'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
dispatcher.rb:171:in `handle_request'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
dispatcher.rb:115:in `dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
dispatcher.rb:126:in `dispatch_cgi'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
dispatcher.rb:9:in `dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/mongrel/
rails.rb:76:in `process'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/mongrel/
rails.rb:74:in `synchronize'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/mongrel/
rails.rb:74:in `process'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/
mongrel.rb:159:in `process_client'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/
mongrel.rb:158:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/
mongrel.rb:158:in `process_client'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/
mongrel.rb:285:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/
mongrel.rb:285:in `initialize'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/
mongrel.rb:285:in `new'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/
mongrel.rb:285:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/
mongrel.rb:268:in `initialize'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/
mongrel.rb:268:in `new'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/
mongrel.rb:268:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/mongrel/
configurator.rb:282:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/mongrel/
configurator.rb:281:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/mongrel/
configurator.rb:281:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/
mongrel_rails:128:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/mongrel/
command.rb:212:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/
mongrel_rails:281
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:489:in `load'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:489:in `load'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:342:in `new_constants_in'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:489:in `load'
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/
mongrel.rb:64
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:496:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:342:in `new_constants_in'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:496:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
script/server:3

c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
request_forgery_protection.rb:79:in `verify_authenticity_token'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
filters.rb:469:in `send!'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
filters.rb:469:in `call'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
filters.rb:441:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
filters.rb:716:in `run_before_filters'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
filters.rb:695:in `call_filters'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
filters.rb:689:in `perform_action_without_benchmark'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
benchmarking.rb:68:in `perform_action_without_rescue'
c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
benchmarking.rb:68:in `perform_action_without_rescue'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
rescue.rb:199:in `perform_action_without_caching'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
caching.rb:678:in `perform_action'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/abstract/query_cache.rb:33:in `cache'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
query_cache.rb:8:in `cache'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
caching.rb:677:in `perform_action'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
base.rb:524:in `send'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
base.rb:524:in `process_without_filters'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
filters.rb:685:in `process_without_session_management_support'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
session_management.rb:123:in `process'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
base.rb:388:in `process'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
dispatcher.rb:171:in `handle_request'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
dispatcher.rb:115:in `dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
dispatcher.rb:126:in `dispatch_cgi'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
dispatcher.rb:9:in `dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/mongrel/
rails.rb:76:in `process'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/mongrel/
rails.rb:74:in `synchronize'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/mongrel/
rails.rb:74:in `process'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/
mongrel.rb:159:in `process_client'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/
mongrel.rb:158:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/
mongrel.rb:158:in `process_client'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/
mongrel.rb:285:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/
mongrel.rb:285:in `initialize'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/
mongrel.rb:285:in `new'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/
mongrel.rb:285:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/
mongrel.rb:268:in `initialize'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/
mongrel.rb:268:in `new'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/
mongrel.rb:268:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/mongrel/
configurator.rb:282:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/mongrel/
configurator.rb:281:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/mongrel/
configurator.rb:281:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/
mongrel_rails:128:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/lib/mongrel/
command.rb:212:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.3-i386-mswin32/bin/
mongrel_rails:281
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:489:in `load'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:489:in `load'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:342:in `new_constants_in'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:489:in `load'
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/
mongrel.rb:64
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:496:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:342:in `new_constants_in'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:496:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
script/server:3

Request

Parameters:

{"id"=>"3"}

Show session dump

---
:csrf_id: f273bd476514f28357fdcdf70df2bbbc
flash: !map:ActionController::Flash::FlashHash
:notice: User was successfully created.

Response

Headers:

{"cookie"=>[],
"Cache-Control"=>"no-cache"}

Not sure what went wrong, can anyone point it for me?

If the Edit is clicked not from there, but from the image button, then
edit will be successful. Thank you

dgurba_ucsb

unread,
Jan 9, 2008, 4:37:49โ€ฏPM1/9/08
to Streamlined
I am also getting this error when I use the "Edit" link from a view.
If I go directly to the the controller for the associated model I can
create/edit/delete directly from those pages ... but not via the "Edit-
In-Place" ... please advised when fixed in SVN. I assume that the Ajax
request is not passing along the :secret key ............. I could be
wrong.

Rob Sanheim

unread,
Jan 9, 2008, 9:40:07โ€ฏPM1/9/08
to strea...@googlegroups.com

dgurba_ucsb

unread,
Jan 10, 2008, 1:51:29โ€ฏPM1/10/08
to Streamlined
ticket posted to Trac.

On Jan 9, 6:40 pm, "Rob Sanheim" <rsanh...@gmail.com> wrote:
> Hi
>
> Could you open a bug report in trac?
>
> http://trac.streamlinedframework.org
>
> thanks,
>
> Robhttp://robsanheim.comhttp://thinkrelevance.com
> ...
>
> read more ยป
Reply all
Reply to author
Forward
0 new messages