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

finne created an issue. See original summary.

finne’s picture

Issue summary: View changes
finne’s picture

Status: Active » Needs review

  • bojanz committed ac397ae on 8.x-2.x authored by finne
    Issue #2885346 by finne: TaxTypePlugin: static typing of functions...
bojanz’s picture

Status: Needs review » Fixed

Committed, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.