ValueListProvider problem while upgrading to 13

In our application we have a multitude of ValueListProviders with many dependencies. The ValueListProviders are defined in the site project but they are used in the CMS project.

Some dependencies of the ValueListProviders (notably on PageComposerContextService) are broken by version 13 of Hippo because the relevant libraries are no longer included in the site project, and they cannot be added back without breaking other basic things that happen deep inside Hippo libraries.

Moving all of our ValueListProviders from the site project to a common library would be one possible solution to this problem, but this would mean a major refactoring of our code base (relocating several hundreds of source files). If possible we want to avoid this course of action.

I have created a small example application that demonstrates the exact nature of the problem:

Does anybody know of a solution to this, other than moving all ValueListProviders and their dependencies out of the site project?

Looking at the example project, it seems you are using the PageComposerContextService to retrieve a mount. You could do:


Hai Jasper,
thank you for your reply. I tried your suggestion but unfortunately this results in an implementation of the mount interface that does not have any site or channel info (neither in Hippo 13 nor in Hippo 12). This is probably the reason that we used the PageComposer to get this information in version 12.

In retrospect, my real question appears to be: how, in Hippo 13, can I obtain the values of channel specific properties while executing code inside of a ValueListProvider method?