Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

javascript TypeError with rails3 project (rails.js, line 2)

#4199
Uncaught TypeError: Cannot call method 'readAttribute' of undefined  - rails.js:2

this is what safari and google chrome (javascript console) tell me.
i am not sure if the problem exists also in the git version, the project has been created with the last rails3 beta.

Reported by audiores · March 16th, 2010 @ 10:29 PM

State: resolved
Milestone: 3.0.2
Assigned to: nobody
Importance: Low

Activity

  1. audiores
    audiores

    i forgot to tell that this is a fresh rails project where this error occurs.

    March 16th, 2010 @ 10:30 PM

  2. Denis Odorcic
    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.

    March 17th, 2010 @ 12:37 AM

  3. audiores
    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

    March 19th, 2010 @ 07:02 PM

  4. Denis Odorcic
    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.

    March 19th, 2010 @ 07:33 PM

  5. Denis Odorcic
    Denis Odorcic
    • Tag changed from csrf, error, javascript, rails.js, rails3 to csrf, error, javascript, rails.js, rails3, resolved

    March 19th, 2010 @ 10:13 PM

  6. Yehuda Katz (wycats)
    Yehuda Katz (wycats)
    • State changed from new to resolved

    March 27th, 2010 @ 08:26 AM

  7. Yehuda Katz (wycats)
    Yehuda Katz (wycats)
    • Tag changed from csrf, error, javascript, rails.js, rails3, resolved to csrf, error, javascript, rails.js, rails3
    • Milestone cleared.

    March 27th, 2010 @ 08:27 AM

  8. Jeremy Kemper
    Jeremy Kemper
    • Milestone set to 3.0.2
    • Importance changed from to Low

    October 15th, 2010 @ 11:01 PM