Skip to content

Commit df37432

Browse files
committed
Add a temporary workaround for #2884870.
1 parent 9897285 commit df37432

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

modules/tax/src/Form/TaxTypeForm.php

+1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ public function form(array $form, FormStateInterface $form_state) {
8585
'#default_value' => $plugin,
8686
'#required' => TRUE,
8787
'#disabled' => !$type->isNew(),
88+
'#limit_validation_errors' => [],
8889
'#ajax' => [
8990
'callback' => '::ajaxRefresh',
9091
'wrapper' => $wrapper_id,

modules/tax/src/Plugin/Commerce/TaxType/Custom.php

+6
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,12 @@ public function removeTerritorySubmit(array $form, FormStateInterface $form_stat
273273
* {@inheritdoc}
274274
*/
275275
public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {
276+
if (!isset($form['territories'])) {
277+
// The form was built by a different plugin, and is now in the process
278+
// of being rebuilt. Temporary workaround for #2884870.
279+
return;
280+
}
281+
276282
$values = $form_state->getValue($form['#parents']);
277283
$values['rates'] = array_filter($values['rates'], function ($rate) {
278284
return !empty($rate) && !isset($rate['add_rate']);

0 commit comments

Comments
 (0)