backdrop-contrib / references_dialog

Extends reference fields by adding links to add, edit, and search for references through a dialog.
https://backdropcms.org/project/references
GNU General Public License v2.0
1 stars 3 forks source link

Fatal error when Drupal compatibility layer is off #31

Closed argiepiano closed 1 month ago

argiepiano commented 1 month ago

If you turn the Drupal compatibility layer off (in settings.php), you get a fatal error when editing the field that uses this widget.

TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function "_element_validate_integer_positive" not found or invalid function name in _form_validate() (line 1497 of /Users/XXX/Sites/localhost/bdtesting/core/includes/form.inc).

The problem is that this module uses the #element_validate callback _element_validate_integer_positive. This callback is not available in Backdrop. See change record.

The solution is to change the form element to type number, instead of using textfield, and to remove the #element_validate callback in references_dialog_field_widget_settings_form()

robertgarrigos commented 1 month ago

Thanks,. @argiepiano . This is fixed now.

robertgarrigos commented 1 month ago

Just checked that the later release works with layer compatibility off.