This project is archived and is in readonly mode.
javascript TypeError with rails3 project (rails.js, line 2)
-
audiores
i forgot to tell that this is a fresh rails project where this error occurs.
-
Denis Odorcic
- Tag changed from error, javascript, rails.js, rails3 to csrf, error, javascript, rails.js, rails3
Error happens when <%= csrf_meta_tag %> is not included into your application layout. See #4084 UJS silently fails when csrf_meta_tag is not present ticket for more info as its a duplicate issue.
-
audiores
even when including the csrf_meta_tag
the following error occurs:Uncaught TypeError: Cannot call method 'readAttribute' of undefined
:5000/javascripts/rails.js?1268779689:2 -
Denis Odorcic
Yea, I looked into this more afterwards and its related to #4136 allow_forgery_protection is false even in development environment by default which I've submitted a patch for. csrf_meta_tag never returns the authenticity tokens.
-
Denis Odorcic
- Tag changed from csrf, error, javascript, rails.js, rails3 to csrf, error, javascript, rails.js, rails3, resolved
Resolved in master by http://github.com/rails/rails/commit/7f53dca1a13e21ec4400a765f637b7...
-
Yehuda Katz (wycats)
- State changed from new to resolved
-
Yehuda Katz (wycats)
- Tag changed from csrf, error, javascript, rails.js, rails3, resolved to csrf, error, javascript, rails.js, rails3
- Milestone cleared.