octobercms/october · error · Error
Modal title is required
Error message
Modal title is required
What it means
Argument validation in ModalUtils' #validateBasicArguments, shared by showAlert/showBasic/showConfirm: the title parameter is not a non-empty string. Every modal requires a textual title; undefined, empty, or non-string titles are rejected before the dialog is created.
Solutions
- Pass a non-empty string as the title argument
- If no title is natural for the dialog, supply a short descriptive label rather than an empty value
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at modules/backend/vuecomponents/modal/assets/js/classes/utils.js:25 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/9537d3fe25e42de3.
Report an issue: GitHub.
Appendix: source
Thrown at modules/backend/vuecomponents/modal/assets/js/classes/utils.js:25
if (typeof options !== 'object') {
throw new Error('options must be an object');
}
if (options.buttonText && typeof options.buttonText !== 'string') {
throw new Error('options.buttonText must be a string');
}
if (options.size && typeof options.size !== 'string') {
throw new Error('options.size must be a string');
}
}
return options || {};
}
#validateBasicArguments(title, text) {
if (typeof title !== 'string' || !title.length) {
throw new Error('Modal title is required');
}
if (typeof text !== 'string' || !text.length) {
throw new Error('Modal text is required');
}
}
showAlert(title, text, options) {
options = this.#validateAlertOptions(options);
this.#validateBasicArguments(title, text);
return new Promise((resolve, reject) => {
// Create container element for Vue app
const wrapperEl = document.createElement('div');
document.body.appendChild(wrapperEl);
// Create Vue 3 app
const app = oc.createVueApp({View on GitHub (pinned to b608633a7e)