GUI extension not working after update from 2.0.0p16 raw to 2.1.0p11 raw

CMK version:2.1.0p11 raw
OS version:RHEL 8.5

Hi all,

we have self written GUI extension which were working fine with CMK 2.0.0p16. After updating to CMK 2.1.0p11 these extensions do not work anymore.
We get error message like:

[cmk.web 50676] Failed to load plugin /omd/sites/my_site/local/share/check_mk/web/plugins/wato/ Working outside of request context.
It looks like the request class got a breaking change.
Is there any example for usage of request class in own GUI extensions under CMK 2.1.0?

Best regards

Hi @Diegau and welcome to the checkmk community.

I am tagging @robin.gierse on this topic. I guess he may could help out with this question. (at least i hope :slight_smile:)

I cannot really help, I am as good at programming as I am at flying a plane.
I might manage, but the result will be subpar. :flight_arrival::boom:

Anyway: A friendly dev bird told me the following:

Checkmk creates a so-called “request context” at the beginning of a request in which things can be stored. At the end of the request this context is discarded. There are some objects that can only be used if this context exists, e.g. request, user, etc. If one of these objects is accessed when no request exists (e.g. at import time) or after the request is finished, this error is generated.

1 Like

Hello Robin,
many thanks. We got it work.
Best regards

1 Like

That’s great to hear. :slight_smile:
If my answer was the solution, please mark it as such, so others can quickly find it, thanks!