Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Upon saving the form display settings, the following error is generated:
TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, non-static method Drupal\filefield_sources_jsonapi\Plugin\FilefieldSource\RemoteJSONAPI::jsoanApiSourceValidateRequired() cannot be called statically in call_user_func_array() (line 282 of /src/public/core/lib/Drupal/Core/Form/FormValidator.php)
Steps to reproduce
- Go to the "Manage form display" page for a Content Type that has a file field. (/admin/structure/types/manage//form-display)
- Expand the settings for the File field
- Enable "JSON API remote URL"
- Click Update
Proposed resolution
Declare method static. Address misspelling.
Remaining tasks
Create patch- Review and test patch
- Merge
User interface changes
None
API changes
None
Data model changes
None
Comment | File | Size | Author |
---|---|---|---|
#3 | filefield_sources_jsonapi-settings_form_validation-3337096-1.patch | 1.35 KB | Nels |
Issue fork filefield_sources_jsonapi-3337096
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 #3
Nels CreditAttribution: Nels commentedI've attempted a patch. This resolved the error for me, and I haven't seen negative side-effects yet.
Comment #4
Nels CreditAttribution: Nels commentedComment #6
szato CreditAttribution: szato at Brainsum commentedThank you, merged.