pimcore / generic-data-index-bundle

Other
3 stars 1 forks source link

[Bug]: GenericDataIndexBundle type error for input quantity value fields #160

Closed cuca24 closed 2 weeks ago

cuca24 commented 1 month ago

Pimcore version

11.2.2

Steps to reproduce

On fresh pim installation with GenericDataIndexBundle

  1. Create class and add simple quantity input field.
  2. Now create Object of that class and in input add for example 2,3 or any letter and save it

Actual Behavior

The update index for GenericDataIndexBundle will fail due to the type error since quantity input field should be numerical (number_format_exception) and thus the process eventually crashes leaving mysql the transaction in uncommitted state and locking the messenger_messages table, and stalling all other functionalities in pimcore.

Expected Behavior

Since the documentation states that quantity input field is numerical it should be good to add validation on quantity input field either on save or already through js and also disable inputting non numerical values into quantity input field.

Since this is connected to GenericDataIndexBundle but i don't see the problem in GenericDataIndexBundle unless we would change the field in open search to be non numerical, but documentation clearly states that the value should be numerical

markus-moser commented 2 weeks ago

Thanks for reporting. The value of the input quantity value data type should definitly be a string and not a number. This is the difference to the regular quantity value type where only numbers are allowed.

-> fixed in #167