Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

ID truncated at period #59

Open
benhaynes opened this issue Oct 25, 2018 · 0 comments
Open

ID truncated at period #59

benhaynes opened this issue Oct 25, 2018 · 0 comments
Labels

Comments

@benhaynes
Copy link
Sponsor Member

From directus created by bensteers : directus/directus#2171

I added some rows to a table via the API where the ID (data type is VARCHAR) is of the pattern [a-z]-[a-z0-9].[a-z]. When I view it on the table page it looks fine, but when I open the page, the ID is truncated at the period. If I save, it will save it as a new row (because the ID is different). But even when I edit the ID to make it match again, it still truncates at the period and saves it as a new row.

Version Info

  • Directus version and branch (Or commit hash): 6.4.9
  • PHP version: 7.1.17
  • MySQL version: Ver 14.14 Distrib 5.5.60, for debian-linux-gnu (x86_64) using readline 6.3
  • OS name and version: Debian GNU/Linux 8 (jessie)

Expected Behavior

ID should stay:
xxxxx-b827ebefb215.xxxx

Actual Behavior

Instead it saves as:
xxxxx-b827ebefb215

Steps to Reproduce

  1. Create table with ID of type VARCHAR (make visible, set length to 50 or something)
  2. Add row via API with ID with pattern abc-abc123.abc
  3. View in table. check id value
  4. Edit via form. check id value. ID should be truncated.
  5. Change ID to be the proper value and hit save.
  6. Now you should have two entries in your table. One with normal ID and one with truncated ID.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant