[typo] Typo 4.x and acts_as_searchable

Piers Cawley pdcawley at bofh.org.uk
Sun Dec 3 18:30:00 EST 2006

"Señor J. Onion" <senor.j.onion at gmail.com> writes:

> Hi this is weird, and don't know how to debug.
> I had an old Typo installation. I upgraded it recently to 4.x. In both
> I have acts_as_searchable on my Content model.
> The old one starts up fine, the new one fails starting on WEBrick,
> with  a 'method_missing' error on acts_as_searchable in my Content
> model???
> Why - when I start the new Typo, does it even look at the Content
> model?  On the old one, I can say acts_as_whatever_trevor and it
> doesn't fire an  error when I start up WEBrick ...
> I've added acts_as_searchable specifically to my environment.rb file
> (path and require), but makes no difference.
> As I said - all I did was upgrade my exisiting installtion to 4.x. Why
>  can't the new Content model 'see' acts_as_searchabel, and why is it
> even  wanting to when I start up WEBrick???
> Any help ... pelase. It's driving me insane.

It's a Rails bug. The problem is that a couple of observers, which
observe Content models get installed before plugins get
loaded. The observers force content.rb to get loaded before support
for acts_as_searchable is loaded, and you're screwed.

I believe it's fixed in the latest Rails 1.2 release candidate and on
the edge, so if you go up to edge typo you should find it starts
working again.

Piers Cawley <pdcawley at bofh.org.uk>

More information about the Typo-list mailing list