Hi Christian, This most likely has to do with the way AR subclasses are reloaded between requests in dev mode, particularly with regards to included modules. What version of Radiant are you using? Can you reproduce these errors in production mode, or are they limited to development mode? Is the pattern one or two successful page edits, followed by errors?
There may be a way to make the Rails dependency loader more aware of the PageExtensions module, I'd certainly take a patch if you wanted to investigate. Josh On Jan 1, 4:20 pm, Christian Aust <[email protected]> wrote: > Hi all, > > I'm using TS with Radiant, which causes me some trouble currently. > Actually I'm not sure if this is originally a problem of TS, or if > it's the radiant extension causing the error, but let me explain: > > I've upgraded the TS gem to 1.3.14, and my application started to spit > out errors every now and then. Errors occur when I try to edit a page > that's a subclass of the ActiveRecord base class "Page", not a page > itself. There are two errors that I spotted so far: > > > NoMethodError (undefined method `any?' for nil:NilClass): > > > > /usr/lib/ruby/gems/1.8/gems/thinking-sphinx-1.3.14/lib/thinking_sphinx/acti > > ve_record/delta.rb:50:in `indexed_data_changed?' > > > > /usr/lib/ruby/gems/1.8/gems/thinking-sphinx-1.3.14/lib/thinking_sphinx/acti > > ve_record/delta.rb:46:in `should_toggle_delta?' > > > > /usr/lib/ruby/gems/1.8/gems/thinking-sphinx-1.3.14/lib/thinking_sphinx/acti > > ve_record/delta.rb:35:in `toggle_delta' > > vendor/extensions/reorder/lib/reorder/pages_controller_extensions.rb:7:in > > `send' > > vendor/extensions/reorder/lib/reorder/pages_controller_extensions.rb:7:in > > `move_lower' > > radiant (0.8.1) > > vendor/plugins/haml/rails/./lib/sass/plugin/rails.rb:19:in `process' > > Theres another NoMethodError in active_record.rb:193 where the code > tries to add an index to self.sphinx_indexes which is nil sometimes, > which is easy to work around: I've added "unless > self.sphinx_indexes.nil?" at the end of the line and was fine so far. > > Can somebody help me to understand whether this is something TS- > related or should I check the code of the Radiant extension? Kind > regards, > > Christian -- You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
