Forum: Rails-core (closed, excessive spam) Exception Notification plugin not working with Rails 2.1?

Posted by Trevor Turk (Guest)
on 2008-06-04 23:50
(Received via mailing list)
We seemed to stop getting exception notifications in an app that's
using Rails 2.1 recently, and I did some digging to try and figure out
what the problem was. I think I'm onto the issue, but it would appear
that my Ruby-fu is still too weak to find a solution just yet.

Here's a failing test with the plugin in a fresh Rails 2.1 app:

http://pastie.org/208968

I think it may be related to this commit, but I'm not sure:

http://github.com/rails/rails/commit/8d37bd08eeac6...

Thanks to github for the awesome search feature :)

http://github.com/rails/rails/search?q=filter_para...

I think that making filter_parameters protected caused the issue
somewhere around here:

http://github.com/rails/exception_notification/tre...

That might be causing this test to fail:

http://github.com/rails/exception_notification/tre...

Any help would be appreciated!

Thanks,
- Trevor
Posted by Michael Koziarski (Guest)
on 2008-06-05 01:32
(Received via mailing list)
> Any help would be appreciated!

If it's just about making the method protected you should be able to 
change:

@controller.filter_parameters(parameters)

to

@controller.send(:filter_parameters, parameters)




--
Cheers

Koz
Posted by Trevor Turk (Guest)
on 2008-06-05 19:46
(Received via mailing list)
On Jun 4, 6:32 pm, "Michael Koziarski" <mich...@koziarski.com> wrote:
> If it's just about making the method protected you should be able to change:
> @controller.filter_parameters(parameters)
> to
> @controller.send(:filter_parameters, parameters)

Thanks for your reply, Koz. This strategy you suggested appears to fix
the issue of the plugin not sending emails when exceptions are raised
in an app using Rails 2.1:

http://github.com/trevorturk/exception_notificatio...

Perhaps someone with commit access to the Rails github would consider
making this change in the official plugin?

Here is a ticket about the issue of the plugin not being compatible
with Rails 2.1:
http://rails.lighthouseapp.com/projects/8995/ticke...

Here is a ticket about the (separate?) issue of the (still) failing
test:
http://rails.lighthouseapp.com/projects/8995/ticke...

===
Just to be clear for others that may be impacted by this issue: the
exception_notification plugin does not appear to work with Rails 2.1
applications!
===

Thanks again,
- Trevor
Posted by tshim (Guest)
on 2008-07-03 00:44
(Received via mailing list)
I'm just chiming in to confirm this bug and the suggested fix -- but
shouldn't this be tracked as an exception_notifier bug, not a rails
bug?
Posted by Yong Bakos (Guest)
on 2008-07-03 01:07
(Received via mailing list)
After the above mentioned fix you may find another error.


Also fixed similarly as above, this time on exception_notifier_helper
line 76:

From:

return @controller.filter_parameters({env_key => env_value}).values[0]

To:

return @controller.send(:filter_parameters, {env_key =>
env_value}).values[0]

I've added this info to the lighthouse ticket:
http://rails.lighthouseapp.com/projects/8995-rails...
This topic is locked and can not be replied to.