Field Type "isEmpty()" method logic does not sync with template logic

Created on 6 September 2024, 8 months ago

Problem/Motivation

Even if there's no template output (because of the formatter settings being checked in the template), the field might be treated as not empty, and the field label will be shown. The reason is, that even if all conditions in the template are false, the "isEmpty()" check of the field formatter might still be true, as the "isEmpty()" method currently only checks the availability status.

The problem is, that we can not simply sync the "isEmpty()" logic with how the formatters renders the field. As then the field type (where "isEmpty()" is declared), would depend on formatter settings, which is problematic.

Steps to reproduce

Proposed resolution

Find a way to properly implement the "isEmpty()" method.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code (commerce_product_availability)

Created by

🇩🇪Germany Grevil

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024