silverstripe / silverstripe-admin

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

FIX JS Console errors and warnings #1699

Closed sabina-talipova closed 3 months ago

sabina-talipova commented 4 months ago

Description

SearchableDropdownField was tested with LinkField, Elemental and simply on a Page. There are not any related errors or warnings in dev or prod.

Parent issue

sabina-talipova commented 4 months ago

There is still no formfield displaying. A field should be displayed (that's the main thing the issue is about - the console errors were just added to help diagnose what's causing the problem).

@GuySartorelli, I fixed it CMS 5.x-dev version (new env) and tested in different objects like Page, LinkField(FileLink) or Elemental. Everywhere I can create, save and update.

Screenshot 2024-03-05 at 11 01 42 AM
GuySartorelli commented 4 months ago

Are you checking inside a modal, as per the reproduction steps in the issue? Screencast from 05-03-24 16:44:43.webm

sabina-talipova commented 4 months ago

Thank you for the video. It helped. Ha, but we are talking about two different fields. You show me issue with TreeDropdownField and I fixed some issues in SearchableDropdownField. If you click on "Details" you can work with fields, but by default (I don't know why?) this modal form is in read only state. Probably, we should update styles for read only fields if they don't have a content.

https://github.com/silverstripe/silverstripe-admin/assets/87288324/741bafa1-20de-426a-8a52-765bb25a9869

GuySartorelli commented 3 months ago

Ahh, oops! The issue was meant to be about the fields I pointed at. I incorrectly identified them as SearchableDropdownField but turns out I was wrong.

I'll merge this since it resolves the console errors. I'll leave it up to you to decide whether to close the attached issue and raise a separate one about TreeDropdownField not displaying, or whether you want to work on that as part of the existing issue.