Mixin within mixin means most parts unavailable in content studio

Enonic version: 6.5.1
OS: Mac

If I use a mixin within a mixin, very few parts will be available for usage in content studio.

I guessing the only parts left are those not using any mixins.

Either one should not be allowed to use a mixin inside a mixin and one should get a build failure,

or

it should just work and all parts should be available in content studio.

This is certainly a bug. What happens now is that when a mixin with an inline mixin is found, there is an error in admin, and it stops processing the rest of the parts. So it is kind of random which parts you will have available in that case.

  • We need to check if mixins within mixins can be supported, and if not show a clear error message.
  • It should also be made more robust. Errors in a mixin must not affect other components that are not using it.

Hopefully this can be fixed for 6.6

1 Like

Are there any updates on this?

Yes, mixins inside mixins is supported.

There is a check for cycles, and it throws an error if the mixin contains another mixin that contains the first mixin.
This works also for indirect cycles:

  • mixin A contains mixin B
  • mixin B contains mixin C
  • mixin C contains mixin A

The fix will be included in the 6.6 release.

1 Like