octobercms/october · error · ApplicationException

Please specify a match for the required field :label.

Error message

Please specify a match for the required field :label.

What it means

After the initial match check, checkRequiredImportColumns verifies every model-required column appears in at least one match group; an unmatched required column throws this ApplicationException naming :label. It enforces required-attribute integrity of the import.

Solutions

  1. Map the named required column to a source file column in the import UI
  2. Mark the model attribute as not required if it truly is optional
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at modules/backend/behaviors/importexportcontroller/ActionImport.php:265 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21). Data as JSON: /api/errors/d740648bbf864bb1. Report an issue: GitHub.

Appendix: source

Thrown at modules/backend/behaviors/importexportcontroller/ActionImport.php:265

            throw new ApplicationException(__("Please match some columns first."));
        }

        $dbColumns = $this->getImportDbColumns();
        foreach ($dbColumns as $column => $label) {
            if (!$this->importIsColumnRequired($column)) {
                continue;
            }

            $found = false;
            foreach ($matches as $matchedColumns) {
                if (in_array($column, $matchedColumns)) {
                    $found = true;
                    break;
                }
            }

            if (!$found) {
                throw new ApplicationException(__("Please specify a match for the required field :label.", [
                    'label' => __($label)
                ]));
            }
        }
    }
}

View on GitHub (pinned to b608633a7e)