Code example not work

Not sure what the issue is then

This code is basically what I use in released extensions.

You’ll have to debug/trace it back and find where the problem is.