generateSampleValue() for FloatItem returns always 1 if a min and max are set in settings

Created on 19 May 2021, about 3 years ago
Updated 3 February 2023, over 1 year ago

Problem/Motivation

When generating content with devel_generate for "Number (float)" fields, the value will always be 1 if that field has a minimum and a maximum in settings.

Steps to reproduce

- Create a content type with a field of the type "Number (float)".
- Download Devel module.
- Install Devel Generate.
- Generate content for your content type.
- The "Number (float)" field will get the value 1 every time instead of a value between the maximum and minimum you just set.

Proposed resolution

Amending the lines that retrieve minimum and maximum for that field type.

πŸ› Bug report
Status

Closed: outdated

Version

10.1 ✨

Component
FieldΒ  β†’

Last updated about 8 hours ago

Created by

πŸ‡¬πŸ‡§United Kingdom m0d

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024