octobercms/october · error · Error

The $.oc.table namespace is not defined. Make sure that the…

Error message

The $.oc.table namespace is not defined. Make sure that the table.js script is loaded.

What it means

Sentinel namespace-check error thrown at the top of the required-field table validator IIFE: the script requires the core table widget ($.oc.table, defined by table.js) to already be loaded on the jQuery object. Seeing this means script load order is wrong — table.validator.required.js was included before (or instead of) table.js.

Solutions

  1. Load table.js before table.validator.required.js
  2. Verify table.js loaded successfully
  3. Fix asset bundle ordering
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at modules/backend/widgets/table/assets/js/table.validator.required.js:10 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/d6f1f35d73f1e76f. Report an issue: GitHub.

Appendix: source

Thrown at modules/backend/widgets/table/assets/js/table.validator.required.js:10

/*
 * Required table validator.
 */
+function ($) { "use strict";

    // NAMESPACE CHECK
    // ============================

    if ($.oc.table === undefined)
        throw new Error("The $.oc.table namespace is not defined. Make sure that the table.js script is loaded.");

    if ($.oc.table.validator === undefined)
        throw new Error("The $.oc.table.validator namespace is not defined. Make sure that the table.validator.base.js script is loaded.");

    // CLASS DEFINITION
    // ============================

    var Base = $.oc.table.validator.base,
        BaseProto = Base.prototype

    var Required = function(options) {
        Base.call(this, options)
    };

    Required.prototype = Object.create(BaseProto)
    Required.prototype.constructor = Required

    /*

View on GitHub (pinned to b608633a7e)