Icons Setting in Field Settings not saving the files

Created on 7 April 2025, 2 months ago

Problem/Motivation

When adding icons to the field settings the files do not appear as the default value of the icon setting and the icon files remain temporary and are never set permanent. The result is that the icons disappear if the field settings form is reloaded and saved or after a cron run and the file is deleted from the system.

Steps to reproduce

1) Create a view mode selector field on an entity.
2) In the field settings upload an icon image file to the default view mode.
3) Save the form.
4) Reload the field settings form and save again.
5) Navigate to the entity add/edit form for the entity that the view mode selector field was added.
6) See that the icon does not display in the field widget.

Proposed resolution

1) Fix the field settings form icon default value. Currently it is setting the default value to 'true' because of faulty logic in the form element.
2) In the icon widget formElement method, check to see if the icon loaded is permanent. If not then set it to permanent.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States tbenice

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024