Coming from my comments in #3487566: Warning: Undefined array key "formatter_settings" in Drupal\custom_field\Plugin\Field\FieldFormatter\BaseFormatter->calculateDependencies().
To reproduce:
- custom field has to be file
- manage display: use the table formatter
- set file format to 'file_url_plain' (URL to file)
- create new node, upload a file
- node/x which will crash: Undefined array key "formatter_settings" in Drupal\custom_field\Plugin\Field\FieldFormatter\BaseFormatter->getFormattedValues() (line 463 of /home/drupal/modules/custom_field/src/Plugin/Field/FieldFormatter/BaseFormatter.php
The trouble is here: https://git.drupalcode.org/project/custom_field/-/blob/3.1.x/src/Plugin/...
$settings[$name] doesn't contain 'formatter_settings' for file.
Patch upcoming
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3510757-2.patch | 855 bytes | swentel |
Issue fork custom_field-3510757
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
swentel commentedComment #5
keshav patel commentedCreated an MR from the patch provided on #2, keeping it on needs review.
Comment #6
apmsooner commentedThank you @keshav! Using the issue forks are definitely preferred :)
Comment #8
apmsooner commentedComment #9
apmsooner commented