statamic / cms

The core Laravel CMS Composer package
https://statamic.com
Other
3.71k stars 508 forks source link

A Replicator Fieldtype with condition opened in the stack cannot open the options #3442

Closed wiebkevogel closed 7 months ago

wiebkevogel commented 3 years ago

Bug Description

How to Reproduce

  1. create collection A which contains a Replicator Fieldtype and is only displayed if a condition is true (e.g. title not empty)
  2. create collection B which contains an Entries Fieldtype with collection A
  3. create an entry B for collection B
  4. create an entry A for collection A in entry B (opens in the stack)
  5. add the title so that the condition is true
  6. try to open the options

The problem could be that by adding the Replicator Fieldtype afterwards, the popover does not take the stack as reference but the underlying window and thus cannot calculate the position correctly.

Extra Detail

Collection A:

      -
        handle: title
        field:
          type: text
     -
        handle: replicator
        field:
          show_when:
            title: not empty   
          sets:
            set_1:
              display: 'Set 1'
              fields: {  }
            set_2:
              display: 'Set 2'
              fields: {  }
            set_3:
              display: 'Set 3'
              fields: {  }

Collection B:

     -
        handle: entries
        field:
          type: entries
          collections: [ collection_a ]
          create: true

Environment

Statamic version: 3.0.31

PHP version: 7.3.14

Install method (choose one):

duncanmcclean commented 7 months ago

Hey 👋

I'm unable to reproduce this issue on the latest version of Statamic. The replicator sets (which is what I assume you mean by "options") are showing correctly after following the replication steps.

I'm going to close this issue now. If you're still experiencing this issue, please leave a comment and we can re-open the issue. Thanks!