octobercms/october · error · Error

The Inspector editor class

Error message

The Inspector editor class "${type}" is not defined in the $.oc.inspector.propertyEditors namespace.

What it means

validateEditorType is a guard: it rejects a property definition whose 'type' names no registered editor in $.oc.inspector.propertyEditors. It fires at surface construction when a property uses an unknown/misspelled editor type or a custom editor was never registered before the Surface is created.

Solutions

  1. Correct the property 'type' in the Inspector YAML/config to a registered editor (e.g. string, checkbox, dropdown)
  2. Register the custom editor in $.oc.inspector.propertyEditors before creating the Surface
  3. Check for typos and case mismatches between the config and the registered editor name
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at modules/backend/assets/foundation/controls/inspector/inspector.surface.js:643 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/9a6a3f1eed17b88f. Report an issue: GitHub.

Appendix: source

Thrown at modules/backend/assets/foundation/controls/inspector/inspector.surface.js:643

    Surface.prototype.findPropertyDefinition = function(property) {
        for (var i=0, len = this.parsedProperties.properties.length; i < len; i++) {
            var definition = this.parsedProperties.properties[i]

            if (definition.property == property) {
                return definition
            }
        }

        return null
    }

    Surface.prototype.validateEditorType = function(type) {
        if (type === undefined) {
            type = 'string'
        }

        if ($.oc.inspector.propertyEditors[type] === undefined) {
            throw new Error('The Inspector editor class "' + type +
                '" is not defined in the $.oc.inspector.propertyEditors namespace.')
        }
    }

    Surface.prototype.popupDisplayed = function() {
        if (this.popupCounter === 0 && this.options.onPopupDisplayed !== null) {
            this.options.onPopupDisplayed()
        }

        this.popupCounter++
    }

    Surface.prototype.popupHidden = function() {
        this.popupCounter--

        if (this.popupCounter < 0) {
            this.popupCounter = 0
        }

View on GitHub (pinned to b608633a7e)