Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Bug Report: Enum with accent value causes an error #7890

Closed
2 tasks done
Emilien-Lambert opened this issue Mar 31, 2024 · 0 comments
Closed
2 tasks done

馃悰 Bug Report: Enum with accent value causes an error #7890

Emilien-Lambert opened this issue Mar 31, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Emilien-Lambert
Copy link

馃憻 Reproduction steps

Creates an enum attribute and adds values to it with UTF-8 characters "茅 猫 脿 么" etc...

In my database, in the _1_attributes table, I have an entry with the values :
formatOptions = {"elements":["RIPH-1(M\u00e9d)","RIPH-2(M\u00e9d)","RIP-(T\u00e9st)"]}

Normally, the element should be "RIP-1(M茅d)" "RIP-2(M茅d)" "RIP-(T茅st)"

There's also a problem with the size because the attribute has a size of 4 whereas my elements have a length of 10.
This is similar to a well-known outcome issue #5595

馃憤 Expected behavior

Can create a document that uses an enum attribute with the value contents of accents

馃憥 Actual Behavior

Pop-up error :

Invalid document structure: Attribute
"type_de_recherche" has invalid format.
Value must be a valid string and no longer than 4 chars

Console error :

2024-03-31T16:40:30.703916999Z [Error] Timestamp: 2024-03-31T16:40:30+00:00 
2024-03-31T16:40:30.703942359Z [Error] Method: POST 
2024-03-31T16:40:30.703950755Z [Error] URL: /v1/databases/:databaseId/collections/:collectionId/documents 
2024-03-31T16:40:30.703959682Z [Error] Type: Appwrite\Extend\Exception 
2024-03-31T16:40:30.703965594Z [Error] Message: Invalid document structure: Attribute "type_de_recherche" has invalid format. Value must be a valid string and no longer than 4 chars 
2024-03-31T16:40:30.703971566Z [Error] File: /usr/src/code/app/controllers/api/databases.php 2024-03-31T16:40:30.703977046Z [Error] Line: 2918

馃幉 Appwrite version

Version 1.5.x

馃捇 Operating system

Linux

馃П Your Environment

Ubuntu 23.10
Appwrite 1.5.3

馃憖 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

馃彚 Have you read the Code of Conduct?

@Emilien-Lambert Emilien-Lambert added the bug Something isn't working label Mar 31, 2024
@Emilien-Lambert Emilien-Lambert closed this as not planned Won't fix, can't repro, duplicate, stale Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant