Issues when creating homebox presets / other people's homeboxes

Created on 9 April 2024, 3 months ago
Updated 25 April 2024, 2 months ago

Problem/Motivation

There are a few problems when creating homeboxes directly:

1.
If we press on the "Add Homebox / Preset" button on "/admin/structure/homebox_type/{homebox_type}/homeboxes" "isPreset" is enabled by default, which is quite confusing. We should differ between "Add Homebox" and "Add Preset" buttons and prebuild the form based on url parameters

2.
When going to the "/admin/homebox/add/{homebox_type}" route, the following error appears:

Warning: Undefined array key 0 in Drupal\homebox\Plugin\Field\FieldWidget\PortletWidget->formElement() (line 84 of modules/custom/homebox/src/Plugin/Field/FieldWidget/PortletWidget.php).

3. When adding a preset, we should manually suffix the preset number to the label. The automatically generated preset on homebox type generation is called "{homebox_type->label} Preset 0". So any other created presets should be named preset 1..2....5 etc..
Meaning we should load all preset homeboxes of the defined homebox_type, count them and add the appropriate number to prepopulate the add form label.

Steps to reproduce

Proposed resolution

Fix the problems.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇩🇪Germany Grevil

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024