silverstripe / silverstripe-admin

Silverstripe Admin Component
BSD 3-Clause "New" or "Revised" License
25 stars 91 forks source link

`SearchableDropdownField` doesn't work in form modal #1690

Closed GuySartorelli closed 4 months ago

GuySartorelli commented 4 months ago

Module version(s) affected

5.x-dev (unreleased feature for 5.2)

Description

In an upload field, if you select "choose existing" and then click on a file, the "permissions" tab of the form on the right doesn't show the "viewer groups" and "editor groups" fields. These are SearchableDropdownField in 5.x-dev.

With yarn dev in silverstripe/admin, you get the following console output:

Uncaught exception TypeError: schema is undefined
    onmatch SearchableDropdownFieldEntwine.js:16

When you insert the file, you get this console output:

Uncaught exception TypeError: Root is undefined
    onunmatch SearchableDropdownFieldEntwine.js:27

How to reproduce

  1. In any upload field, click "choose existing"
  2. Click on a file, but don't insert it yet
  3. Look in the "permissions" tab in the form on the right.

Possible Solution

No response

Additional Context

No response

Validations

PR

GuySartorelli commented 4 months ago

PR merged.

As per https://github.com/silverstripe/silverstripe-admin/pull/1699#issuecomment-1979549915 I'll leave it up to you to decide whether to close this issue and raise a separate one about TreeDropdownField not displaying, or whether you want to work on that as part of the existing issue.

sabina-talipova commented 4 months ago

New issue for TreeDropdownField was open. https://github.com/silverstripe/silverstripe-admin/issues/1701 Close this ticket.