V8-archive: Translation Interface: Required fields not enforced

Created on 13 Nov 2019  路  3Comments  路  Source: directus/v8-archive

Bug Report

Steps to Reproduce

  1. Create a new collection with translated field e.g. label
  2. Mark the said translated field as required
  3. Create a new record in the collection without a value for the required translated field
  4. See that the new record is saved without an error

Expected Behavior

Validation error required the field

Actual Behavior

Saved the record with empty required field

Other Context & Screenshots


translation_required_field_not_enforced_480

Technical Details

Reproduced on directus.app

bug api

Most helpful comment

We ran into this problem on version 8.6.2.

Setup
We have an exhibition_translations collection with a field "title" marked as required.
We have an exhibition collection with a field "translations" that manages the translations relationship.

Issues

  • Initially we did not mark the "translations"-field in exhibition as required, the effect being that the requirement of the title field is not enforced
  • Changing the "translations"-field in exhibition to required is not possible and leads to the error "Statement could not be executed (42S22 - 1054 - Unknown column 'translations' in 'where clause')". WORKAROUND: Delete the translations field and then add it again with required.
  • If the "translations"-field is marked as required, then the required fields in the exhibition_translations table are enforced, but only for one language. Meaning if you fill the title field for english and don't fill it for french (in our case), this is not seen as an error.

Expected behaviour

  • Possibility to change the required setting of translations-type-fields
  • The required fields should be enforced for all languages

All 3 comments

Hey @chintohere - Thanks for reporting the issue. I tried to replicate it but not able to do so in our latest version v8.3.1.

Can you please update your version? Let me know if it still persists over there. :)

@chintohere - 馃敂

We ran into this problem on version 8.6.2.

Setup
We have an exhibition_translations collection with a field "title" marked as required.
We have an exhibition collection with a field "translations" that manages the translations relationship.

Issues

  • Initially we did not mark the "translations"-field in exhibition as required, the effect being that the requirement of the title field is not enforced
  • Changing the "translations"-field in exhibition to required is not possible and leads to the error "Statement could not be executed (42S22 - 1054 - Unknown column 'translations' in 'where clause')". WORKAROUND: Delete the translations field and then add it again with required.
  • If the "translations"-field is marked as required, then the required fields in the exhibition_translations table are enforced, but only for one language. Meaning if you fill the title field for english and don't fill it for french (in our case), this is not seen as an error.

Expected behaviour

  • Possibility to change the required setting of translations-type-fields
  • The required fields should be enforced for all languages
Was this page helpful?
0 / 5 - 0 ratings

Related issues

ondronix picture ondronix  路  3Comments

jwkellyiii picture jwkellyiii  路  3Comments

Varulv1997 picture Varulv1997  路  3Comments

cdwmhcc picture cdwmhcc  路  3Comments

maettyhawk picture maettyhawk  路  3Comments