ActiveScaffold - RJS Error with Firefox 3 and Safari 3.1

| | Comments (0) | TrackBacks (0)

Recently I'm testing in Firefox 3 the "admin" section - implemented using ActiveScaffold - of a Rails application we made.

I'm getting RJS Errors when trying to update a record:
  • TypeError: $$("#admin__operator_details-update-151-form a.cancel").first().link is undefined
  • $$("#admin__operator_details-update-151-form a.cancel").first().link.close_with_refresh();

The issues is already reported as #553

The summary is that the problem lies within the deprecated getElementsByClassName function in the active_scaffold.js.

To fix (thanks to Eric Bjorkvall) just replace in files:

  • /public/javascripts/active_scaffold/default/active_scaffold.js
  • /vendor/plugins/active_scaffold/frontends/default/javascripts/active_scaffold.js
the line: with:

Instead of replacing the original assets of ActiveScaffold I skipped the change on /vendor/plugins/active_scaffold/frontends/default/javascripts/active_scaffold.js and just comment the /vendor/plugins/active_scaffold/init.rb in order to avoid the copy assets on plugin initialization.

0 TrackBacks

Listed below are links to blogs that reference this entry: ActiveScaffold - RJS Error with Firefox 3 and Safari 3.1.

TrackBack URL for this entry: http://www.hasmanydevelopers.com/cgi-bin/mt/mt-tb.cgi/4

Leave a comment

About this Entry

This page contains a single entry by Edgar González published on July 3, 2008 5:10 PM.

View Tips to avoid Growing Pains was the previous entry in this blog.

Just a mockup you say? is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.