octobercms/october · error · Error

Popover trigger element is not provided

Error message

Popover trigger element is not provided

What it means

Argument guard in the Popover component's show method: show(triggerElement) was called without a trigger element. The popover positions itself relative to that element, so without it the component cannot compute placement and refuses to open.

Solutions

  1. Pass the triggering DOM element (usually 'this' or the event target) when calling show()
  2. If showing programmatically, first obtain and pass the anchor element reference
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at modules/backend/vuecomponents/popover/assets/js/popover.js:90 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/a1459e5717e439b3. Report an issue: GitHub.

Appendix: source

Thrown at modules/backend/vuecomponents/popover/assets/js/popover.js:90

            if (this.in) {
                result += ' show ';
            }

            if (this.position === 'bottom-right') {
                result += ' placement-bottom placement-bottom-right';
            }

            return result;
        },

        isVisible() {
            return this.visible;
        }
    },
    methods: {
        show(triggerElement) {
            if (!triggerElement) {
                throw new Error('Popover trigger element is not provided');
            }

            this.offset.top = 0;
            this.offset.left = 0;

            this.visible = true;
            Vue.nextTick(_ => {
                this.in = true;
                this.loadPosition(triggerElement);
            });

            $(document.body).on('keydown', this.onKeyDown);
        },

        hide(byEscape) {
            $(document.body).off('keydown', this.onKeyDown);
            this.in = false;

View on GitHub (pinned to b608633a7e)