octobercms/october · error · Exception

A row is not found for the updated data

Error message

A row is not found for the updated data

What it means

The client-side PageLookupWidget requires an `alias` option because it builds its AJAX handler names from it (`this.config.alias + '::onRefreshReference'`, `alias::onInsertReference`) so the popup can talk back to the server-side PageLookup widget. The constructor normalizes config through getConfig and immediately throws this Error when `alias` is still null (it defaults to null in DEFAULTS).

Source

Thrown at modules/backend/assets/foundation/controls/inspector/inspector.editor.objectlist.js:329

    ObjectListEditor.prototype.disposeInspector = function() {
        $.oc.foundation.controlUtils.disposeControls(this.popup.querySelector('[data-inspector-container]'))
        this.currentRowInspector = null
    }

    ObjectListEditor.prototype.applyDataToRow = function(row) {
        if (this.currentRowInspector === null) {
            return
        }

        var data = this.currentRowInspector.getValues()
        row.setAttribute('data-inspector-values', JSON.stringify(data))
    }

    ObjectListEditor.prototype.updateRowText = function(property, value) {
        var selectedRow = this.getSelectedRow()

        if (!selectedRow) {
            throw new Exception('A row is not found for the updated data')
        }

        if (property !== this.propertyDefinition.titleProperty) {
            return
        }

        value = $.trim(value)

        if (value.length === 0) {
            value = '[No title]'
            $.oc.foundation.element.addClass(selectedRow, 'disabled')
        }
        else {
            $.oc.foundation.element.removeClass(selectedRow, 'disabled')
        }

        selectedRow.firstChild.textContent = value
    }

View on GitHub (pinned to b608633a7e)

Solutions

  1. Pass `alias` in the popup config: `$.oc.pageLookup.popup({ alias: 'pagelookup', ... })`.
  2. Use the same alias as the server-side PageLookup widget rendered on the page (the `alias` you gave the PHP widget, e.g. 'pagelookup'), so `alias::onInsertReference` resolves.
  3. If you render the widget yourself in PHP, pass its alias through to JS: `alias: <?= $this->getSelectFormWidget(...) ?>` equivalent or `<?= $widget->alias ?>`.

Example fix

// before
$.oc.pageLookup.popup({
    value: 'cms-page::about/team'
});

// after
$.oc.pageLookup.popup({
    alias: 'pagelookup',
    value: 'cms-page::about/team'
});
Defensive patterns

Strategy: type-guard

Type guard

// Guard before opening the popup
/**
 * @param {{ alias?: string|null }} config
 * @returns {boolean}
 */
function hasLookupAlias(config) {
    return config != null
        && typeof config.alias === 'string'
        && config.alias.trim().length > 0;
}

if (!hasLookupAlias(cfg)) {
    throw new Error('pageLookup requires config.alias matching the server widget alias');
}
$.oc.pageLookup.popup(cfg);

Try / catch

try {
    $.oc.pageLookup.popup(cfg);
} catch (e) {
    if (/alias/.test(e.message)) {
        // re-open with alias copied from the PHP widget, e.g. 'pagelookup'
    }
}

Prevention

When it happens

Trigger: Calling `$.oc.pageLookup.popup({...})` (or `new $.oc.pageLookup(...)`) with no `alias` key, or with `alias: null`/`alias: ''`-equivalent value. Any custom code that opens the page lookup popup without copying the widget alias from the server.

Common situations: Opening the lookup popup from a custom button or RichEditor form widget integration and forgetting the alias; refactoring config objects and dropping the alias key; mismatched docs example.

Related errors


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