Include Page macro can show content from page that does not belong to the current variant

This is my page 1 include

Page 1 is labeled so that is part of the both variants A and B


Page 2 is labeled so that it is part of only the variant DUCK



When a customer includes a page via the Include Content (Include page) macro on the page Main article that belongs to all variants, and the included page Page 2 belongs only to variant A, content from variant A is shown also when viewing the Main article in variant B.

Customer expects that browsing the Main article in the variant A shows only content belonging to the variant A, and browsing in the variant B shows only content belonging to the variant B.

Steps to Reproduce:

  1. Create a Main article that belongs to the both variants A and B

  2. Add an Include Page macro including Page 1

    1. Page 1 is labeled so that is part of the both variants A and B

  3. Set up a second Include Page macro that includes Page 2

    1. Page 2 is labeled so that it is part of only the variant A

  4. Publish the site

  5. Browse the Main article using the variant A

  6. Switch to the variant B

Expected Result: Each variant displays only the content that matches the selected variant. Include Page macro pointing to Page 2 (that only belongs to variant A) should resolve to empty content when browsing in the variant B.

Actual Result: When browsing in the variant B, Scroll Conditional Content from Page 2 that should only belong to variant A is incorrectly displayed on the Main article.

Workaround: Content authors can avoid this by either:
(a) Ensuring any included page is accessible in all variants that the including page is in, or
(b) Wrapping the Include Page macro in a Scroll Conditional Content macro labeled only for the variants the included content supports