Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Widget accepts "1/2," but on save generates error and abandons changes.
Comment | File | Size | Author |
---|---|---|---|
#5 | fraction-quantity-error-2117783-5.patch | 3.55 KB | dcam |
Comments
Comment #1
mropanen CreditAttribution: mropanen commentedTo fix this, I added this to
recipe_ingredient_autocomplete_validate
(The long if-empty line is there to make sure we can actually delete an ingredient by emptying all the fields :)
Comment #2
dcam CreditAttribution: dcam commentedThe ingredient field conversion missed an important step in processing form input, converting fractional quantities to decimal. Entering a fractional quantity in the field will cause Drupal to try and save the text to the float database field, resulting in a database error.
This patch should fix the error.
Comment #3
dcam CreditAttribution: dcam commentedForgot to set the status.
Comment #5
dcam CreditAttribution: dcam commentedMinor edit. I moved the function in recipe.module.
Comment #7
dcam CreditAttribution: dcam commented