Function maxlength_field_widget_third_party_settings_form() should return array.
Please check function hook_field_widget_third_party_settings_form() definition.
Issue fork maxlength-3530218
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
divyansh.gupta commentedWorking on it!!
Comment #4
divyansh.gupta commentedYes i agree that if there is nothing to show then also it should return an array, thus made the required changes.
Please review!!
Comment #5
super_romeo commentedThank you, @divyansh.gupta!
Works as expected :)
Comment #6
mlncn commentedThe patch is straightforward and very needed.
Marking as major because it can cause a fatal error when you try to go to the manage display form of a content type (for example
/admin/structure/types/manage/article/form-display). And there is no easy way to figure out that maxlength is to blame without a debugger (or searching the web now that i'm dumping the entire error message here):The website encountered an unexpected error. Try again later.
TypeError: Unsupported operand types: array + null in Drupal\field_ui\Form\EntityFormDisplayEditForm->{closure:Drupal\field_ui\Form\EntityFormDisplayEditForm::thirdPartySettingsForm():129}() (line 131 of core/modules/field_ui/src/Form/EntityFormDisplayEditForm.php).
And the stacktrace:
Comment #7
joevagyok commentedComment #8
joevagyok commentedThank you for the report and the fix!
Comment #10
joevagyok commented