A copy of ApplicationController has been removed from the module tree but is still active!

8 views
Skip to first unread message

Bess Sadler

unread,
Aug 3, 2009, 10:42:50 AM8/3/09
to Blacklight Developers List
I have a Blacklight app to which I've added a local model (an
"Address" model so that institutions using the app can keep their
contact information current) and I started seeing this error: "A copy
of ApplicationController has been removed from the module tree but is
still active!"

I did some searching and came up with this article: http://strd6.com/?p=250
Apparently this problem can also manifest with the error "can’t dup
NilClass"

The fix is easy: Add a line that says "unloadable" to the model you've
defined:

class Address < ActiveRecord::Base
unloadable # <-- right here
validates_presence_of
[:name
, :institution
, :url, :city, :state, :postal_code, :phone_number], :message => 'is
required'
end
It was an intermittent error in the first place, so it's hard to say
for sure, but I think this has fixed things for me. I'm writing this
just in case anyone else encounters it. It's apparently a problem
particular to applications that use engines plugins.
Bess


Jason Ronallo

unread,
Aug 3, 2009, 4:20:08 PM8/3/09
to blacklight-...@googlegroups.com
Bess,
I can't get to Jira but I did enter a ticket for something like this.
I think it is ticket 138. I've had to set Blacklight Controllers that
I override as 'unloadable' within the plugin. It has been working well
for me for a couple months now without issue.

Jason
Reply all
Reply to author
Forward
0 new messages