Closed yorkshire-pudding closed 2 years ago
Hmm, strange. I can't dig deeper right now but that pattern/function seems to be in use in at least one case in core:
Very odd - not causing any blockages right now, but thought it was worth logging.
Is Drupal compatibility turned off on the site you're working on?
https://docs.backdropcms.org/api/backdrop/core%21includes%21drupal.inc/function/element_sort/1
Looks like this function has been deprecated and should be replaced. (In core, too, in at least a few places/references)
Yes, it is switched off. Just done search for it:
Care to open a core issue for this, too? The functions in drupal.inc
obviously stay (at least until Backdrop 2.0) but the others should probably be fixed/cleaned up.
Yes, ok - done at https://github.com/backdrop/backdrop-issues/issues/5535
It's a bit sparse as I'm not sure what steps I need to take to trigger the warning in core
@yorkshire-pudding I think this is fixed in the latest dev version -- feel free to test.
Steps to reproduce
Expected result Form loads normally
Actual result Warning: uasort() expects parameter 2 to be a valid callback, function 'element_sort' not found or invalid function name in theme_paragraphs_bundle_settings_form() (line 718 of /app/docroot/modules/paragraphs/paragraphs.module). Form appears to work normally and I don't get any errors if messages switched off though probably would appear in the log.
Line in question in current code base is: https://github.com/backdrop-contrib/paragraphs/blob/e1d39254e38cfccca5d323dda60293d485858154/paragraphs.module#L720