{"record":{"id":"fab28d85b8a04e08","repo":"MagicMirrorOrg/MagicMirror","slug":"calendar-deprecation-warning-please-consider-up","errorCode":null,"errorMessage":"[calendar] Deprecation warning: Please consider upgrading your calendar titleReplace configuration to customEvents.","messagePattern":"\\[calendar\\] Deprecation warning: Please consider upgrading your calendar titleReplace configuration to customEvents\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"defaultmodules/calendar/calendar.js","lineNumber":161,"sourceCode":"\t\t\tif (calendar.user && calendar.pass) {\n\t\t\t\tLog.warn(\"[calendar] Deprecation warning: Please update your calendar authentication configuration.\");\n\t\t\t\tLog.warn(\"https://docs.magicmirror.builders/modules/calendar.html#configuration-options\");\n\t\t\t\tcalendar.auth = {\n\t\t\t\t\tuser: calendar.user,\n\t\t\t\t\tpass: calendar.pass\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * tell helper to start a fetcher for this calendar\n\t\t\t * fetcher till cycle\n\t\t\t */\n\t\t\tthis.addCalendar(calendar.url, calendar.auth, calendarConfig);\n\t\t});\n\n\t\t// for backward compatibility titleReplace\n\t\tif (typeof this.config.titleReplace !== \"undefined\") {\n\t\t\tLog.warn(\"[calendar] Deprecation warning: Please consider upgrading your calendar titleReplace configuration to customEvents.\");\n\t\t\tfor (const [titlesearchstr, titlereplacestr] of Object.entries(this.config.titleReplace)) {\n\t\t\t\tthis.config.customEvents.push({ keyword: \".*\", transform: { search: titlesearchstr, replace: titlereplacestr } });\n\t\t\t}\n\t\t}\n\n\t\tthis.selfUpdate();\n\t},\n\n\tnotificationReceived (notification, payload) {\n\t\tif (notification === \"FETCH_CALENDAR\") {\n\t\t\tthis.sendSocketNotification(notification, { url: payload.url, id: this.identifier });\n\t\t}\n\t},\n\n\t// Override socket notification handler.\n\tsocketNotificationReceived (notification, payload) {\n\n\t\tif (this.identifier !== payload.id) {","sourceCodeStart":143,"sourceCodeEnd":179,"githubUrl":"https://github.com/MagicMirrorOrg/MagicMirror/blob/4b4a59534f7da01e4030e46029fe9dd649a7675e/defaultmodules/calendar/calendar.js#L143-L179","documentation":"The calendar module historically supported a `titleReplace` config array of [search, replace] pairs for rewriting event titles. This was superseded by the more general `customEvents` option. If titleReplace is defined, the module logs this deprecation warning and converts each entry into a customEvents entry (keyword \".*\", transform {search, replace}) so old configs keep working.","triggerScenarios":"The calendar module config defines `titleReplace` (any value, checked via typeof !== \"undefined\") in config.js, triggering the warning at defaultmodules/calendar/calendar.js:161 in start().","commonSituations":"Configs hiding keywords like 'Birthday:' or 'Cancelled' from feed titles, written years ago; copied forum snippets using titleReplace; upgrading MagicMirror without reviewing per-module options.","solutions":["Migrate each titleReplace pair to customEvents: { keyword: \".*\", transform: { search, replace } }","If titleReplace was an array of pairs, note customEvents is an array of objects — restructure accordingly","Use the opportunity to use more specific keywords than \".*\" so only matching titles are transformed","Remove the titleReplace key after migration to silence the warning"],"exampleFix":"// before\nconfig: { titleReplace: { \"Birthday: \": \"\" } }\n// after\nconfig: { customEvents: [ { keyword: \".*\", transform: { search: \"Birthday: \", replace: \"\" } } ] }","handlingStrategy":"validation","validationCode":"if (\"titleReplace\" in calendarConfig) {\n  console.warn(\"titleReplace is deprecated: migrate to customEvents with keyword/transform\");\n}","typeGuard":"function usesDeprecatedTitleReplace(cfg) {\n  return typeof cfg === \"object\" && cfg !== null && \"titleReplace\" in cfg;\n}","tryCatchPattern":null,"preventionTips":["Migrate titleReplace entries to customEvents objects ({keyword, transform:{search, replace}})","Prefer specific keywords over \".*\" in customEvents","Re-check module options after every MagicMirror upgrade","Clear all startup warnings before declaring an upgrade complete"],"tags":["deprecation","calendar","configuration","custom-events"],"backgroundTag":"deprecated-config-option","analyzedSha":"4b4a59534f7da01e4030e46029fe9dd649a7675e","analyzedAt":"2026-08-31T21:49:42.591Z","schemaVersion":2},"datasetVersion":"2026-08-31T22:30:34.772Z"}