RT 5.0.2 Overlays

Hello,
I have a question and hope someone may answer. I wrote some plugins and used the overlay technique to add sub routines to Web_Local.pm in the appropriate folder structure. Now I thought I could do global subroutine, not within a plugin, on Web_Local.pm located /opt/rt5/locals/lib/RT/Interface/Web_Local.pm but it does not get hit. I tried according to “CustomizingWithOverlays - Request Tracker Wiki” with Web_Overlay.pm, Web_Vendor.pm and Web_Local.pm but non of them was triggert. But the Web_Local.pm down in my plugins folder structure works without problems. perl -c returns OK and implementing the piece of code into plugins Web_Local.pm or in source Web.pm works like expected.
Does anybody have an idea or do I make an mistake?
Greets, Manuel

You mean you made a version in local/lib../ and it isn’t showing up?

Example: I created a plugin at:
/opt/rt5/local/plugins/RT-Extension-Example/lib/RT/Interface/Web_Local.pm
This is working. All debug messages are visible in log.

Then I created one at:
/opt/rt5/local/lib/RT/Interface/Web_Local.pm
This is not working. No debug messages in log.

Both Web_Local.pm have different sub routines and do not override each other.

Which package HTML::Mason::Commands; value do you have for the local overlay?

One easily overlooked thing I should ask: have you flushed the Mason cache and restarted your web server? Unless you’ve set RT up in developer mode it might end up caching the Mason components for the page so you won’t see your local overlay code.

… I had none set at the begining. After your question, I tried
package HTML::Mason::Commands; didn’t change anything but where able to change with
package RT::Interface::Web;
After bring in this line of code, the /opt/rt5/local/lib/RT/Interface/Web_Local.pm worked but the one in the plugin wasn’t reachable anymore.

So maybe the better question would be does somebody have an working example overlaying Web_Local.pm in different places?

Yes I did. I created a small script I run always after changes, flushing mason cache and restarting apache :wink: