Hi My goodness it took quite some time to prepare a unit test case for ActionHelper/UrlBuilder issue. It would have been much easier to simply create a sample.
Anyway, it's been reported here: http://issues.castleproject.org/issue/MR-577 Tomasz On 15 Lut, 23:18, John Simons <johnsimons...@yahoo.com.au> wrote: > First things first: > - Please log the bugs in our bug tracking website and provide breaking > sample or unittest > > Cheers > John > > On Feb 16, 7:48 am, Tomek Pluskiewicz <ploos...@gmail.com> wrote: > > > > > > > > > Thank you for replying > > > By extension I certainly mean extension, not filter ;) > > > I would like to help with those issues. I could try in some spare, but > > that will come later. > > > For the ActionHelper+UrlInfo I would need some guidelines. Where would > > I grab necessary parameters for UrlInfo constructor? > > > Tomasz > > > On 15 Lut, 01:16, John Simons <johnsimons...@yahoo.com.au> wrote: > > > > Tomek, > > > > So that I'm sure we are talking about the same thing, when you refer > > > to Extension do you mean this > > > -http://www.castleproject.org/monorail/documentation/v20/advanced/exte... > > > Or do you mean a filter? > > > -http://www.castleproject.org/monorail/documentation/v20/usersguide/fi... > > > > Cheers > > > John > > > > On Feb 14, 2:09 am, Tomek Pluskiewicz <ploos...@gmail.com> wrote: > > > > > Hi > > > > > Today I've experienced a weird behaviuor from MonoRail while using > > > > elements mention in the topic. > > > > > Imagine the following: > > > > 1. I have a custom extension, which loads menu items from > > > > configuration and then uses UrlHelper to build links for those items. > > > > 2. On one of the pages I use ActionHelper's Render method > > > > 3. The whole thing explodes inside Controller#DisposeFilters() with > > > > NullReferenceExpception > > > > > I spent some time looking into that issue and it seems the problem > > > > lies inside ActionHelper. > > > > 1. ActionHelper creates UrlInfo without supplying AppVirtualDir, which > > > > causes UrlBuilder to fail inside extension > > > > 2. Because extensions fire before other MonoRail steps, the disposing > > > > of Controller happens before it has been contextualized > > > > 3. The above is the reason of NullRefereneException (the null is in > > > > fact Controller#context) > > > > > There are a few weak spots I thnk should be fixed: > > > > 1. Dispose should be invulnerable to NullReferenceException. Extension > > > > failing is a good reason not to assume, that all Controller's > > > > properties will be set. Other solution would be actually > > > > contextualizing *before* anything could go wrong > > > > 2. Another UrlInfo constructor should be used for ActionHelper. That > > > > is the direct reason for my problem. I'm not sure how to supply all > > > > the required parameters correctly though. > > > > 3. Last issue is exception handling inside MonoRail, which hasn't just > > > > once failed me. This is not the first time I've encountered MonoRail > > > > display not the actual exception, which tends to be quite misleading. > > > > It took me quite a lot of digging to figure out what's going on. > > > > > On the other hand thank god MR is open source. I doubt I would be able > > > > to find my solution for a simmilari issue with ASP.NET... ;) -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to castle-project-users@googlegroups.com. To unsubscribe from this group, send email to castle-project-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.