spicywebau / craft-quick-field

Create Craft CMS fields on the fly while designing field layouts
MIT License
106 stars 6 forks source link

Editing a Supertable field fails with error : Translation Method cannot be blank. #22

Closed nstCactus closed 10 months ago

nstCactus commented 10 months ago

Bug Description

When editing a supertable field using quick-field, it is impossible to save.

The server responds with a 400 Bad request error.

I suspect this is caused by the quick-field modal not showing the translationMethod dropdown as I only have 1 site.

Steps to reproduce

  1. Set up a single-site Craft 4 install
  2. Using the Craft native UI, create a Supertable field with the following subfields:
    • heading (Redactor)
    • contentType (Entries)
  3. Save the field
  4. Add the field to a field layout
  5. Edit the field using quick-field
  6. Rename the field handle
  7. Save the field
  8. The modal shakes to indicate an error, nothing else explains why it failed in details
  9. In the dev tools's network tab, the query to https://example.ddev.site/index.php?p=admin%2Factions%2Fquick-field%2Factions%2Fsave-field&v=1697446077292 shows the 400 error

Expected behaviour

Saving the field should succeed. If it doesn't, the errors property from the server response should be displayed in the quick-field modal.

Quick Field version

2.0.6

Craft CMS version

4.5.6.1

nstCactus commented 10 months ago

Wow, that was quick!

ttempleton commented 10 months ago

Thanks for reporting that - I think it was probably the same error as was causing #18, but I couldn't reproduce back then due to testing on a multi-site install 🙃

That should be fixed now in 2.0.7.

nstCactus commented 10 months ago

I just got a chance to test it, it's fixed indeed. Thanks!