octobercms/october · error · Error

options.liveMode must be boolean

Error message

options.liveMode must be boolean

What it means

Type guard in showModal's options validation: options.liveMode was provided but is not a boolean. Live mode (applying changes immediately instead of on Apply) is a binary flag, so non-boolean values are rejected during validation of the options bag.

Solutions

  1. Pass liveMode as true or false, or leave it unset to use the default mode
  2. Wrap computed values in Boolean(...) before adding them to the options object
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at modules/backend/vuecomponents/inspector/assets/js/classes/host.js:49 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/5011875cb56a852f. Report an issue: GitHub.

Appendix: source

Thrown at modules/backend/vuecomponents/inspector/assets/js/classes/host.js:49

            if (options.size && typeof options.size !== 'string') {
                throw new Error('options.size must be a string');
            }

            if (options.description && typeof options.description !== 'string') {
                throw new Error('options.description must be a string');
            }

            if (options.resizableWidth && typeof options.resizableWidth !== 'boolean') {
                throw new Error('options.resizableWidth must be boolean');
            }

            if (options.beforeApplyCallback && typeof options.beforeApplyCallback !== 'function') {
                throw new Error('options.beforeApplyCallback must be a function');
            }

            if (options.liveMode && typeof options.liveMode !== 'boolean') {
                throw new Error('options.liveMode must be boolean');
            }
        }

        options = options || {};

        return new Promise(function (resolve, reject) {
            var applyClicked = false;

            // Create container element for Vue app
            var wrapperEl = document.createElement('div');
            document.body.appendChild(wrapperEl);

            // Create Vue 3 app with event handlers
            var app = oc.createVueApp({
                data() {
                    return {
                        title: title,
                        description: options.description || '',

View on GitHub (pinned to b608633a7e)