octobercms/october · error · Error

View bag component not found

Error message

View bag component not found

What it means

Error "View bag component not found" thrown in octobercms/october.

Source

Thrown at modules/cms/assets/js/cms.editor.extension.documentcomponent.base.js:291

            const parts = command.split('@');
            const buttonIndex = parts[1];
            const buttons = this.extension.getCustomToolbarSettingsButtons(this.documentType);

            if (!buttons[buttonIndex]) {
                return;
            }

            const button = buttons[buttonIndex];
            const settingsProperties = button.properties;

            if (typeof settingsProperties !== 'object') {
                throw new Error('Custom button properties must be an array');
            }

            let dataHolder = this.documentData;
            if (button.useViewBag) {
                if (!this.viewBagComponent) {
                    throw new Error('View bag component not found');
                }

                dataHolder = JSON.parse(this.viewBagComponent.propertyValues);
            }

            inspectorHost
                .showModal(
                    button.popupTitle ? button.popupTitle : this.documentSettingsPopupTitle,
                    dataHolder,
                    settingsProperties,
                    'cms-custom-settings',
                    {
                        buttonText: this.trans('backend::lang.form.apply'),
                        resizableWidth: true,
                        beforeApplyCallback: async (updatedDataObj) => {
                            if (button.useViewBag) {
                                this.viewBagComponent.propertyValues = JSON.stringify(updatedDataObj);
                            }

View on GitHub (pinned to b608633a7e)

When it happens

Trigger: Thrown at modules/cms/assets/js/cms.editor.extension.documentcomponent.base.js:291 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/f98ec6bae2ba3aeb. Report an issue: GitHub.