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.
When running on PHP 7.1:
In the GUI add new Tax add Rate button does not ajax load a second rate form part.
It is a bug to do with typing: I get an ajax error on all buttons of that form. The error is caused by a deprecated notice:
ResponseText: ↵( ! ) Deprecated: call_user_func_array() expects parameter 1 to be a valid callback, non-static method Drupal\commerce_tax\Plugin\Commerce\TaxType\Custom::addTerritorySubmit() should not be called statically in /Applications/MAMP/htdocs/uctd8/web/core/lib/Drupal/Core/Form/FormSubmitter.php on line 111
This also happens for Custom::ajaxCallback()
These functions need to be static, as call_user_func_array cannot instantiate an object.
Comments
Comment #2
finneComment #3
finneSee https://github.com/drupalcommerce/commerce/pull/747
Comment #5
bojanz CreditAttribution: bojanz at Centarro commentedCommitted, thanks!