Read the statement by Michael Teeuw here.
Default calendar customEvents not working
-
@pauabaer you didn’t add the debug setting to config.js
the transform happens in the front end, the backend (node_helper) gets the events from source and formats them for frontend.tye log you showed is from the backend
-
@sdetweil
I did add the debug setting but presumably at the wrong position.
Thought I should add it here:module: "calendar", header: "Familienkalender", position: "top_left", config:{ loglevel: ["DEBUG"], customEvents: [ { keyword: "Geburtstag", symbol: "birthday-cake", transform: { search: "^([^\']*) \'(\\d{4})$", replace: "$1 ($2)", yearmatchgroup: 2 } } -
@pauabaer logevel is above the modules list
its not a module setting
-
@sdetweil
Meanwhile I found the right place. Sorry for this.
In the pic below you can see the entry.
Does help you?
-
your search regex is wrong,
^(.+) (\\d{4}) Geburtstag$its captures EVERYTHING from the start… and there is nothing left for the remainder of the expression
you need to capture any character UP to the 1st space,
^([^\s]+) (\d{4}) Gerburstag$I use https://regex101.com/ to test (see below)
escape the backslash as required

-
@sdetweil
Ok. Within the regex101 there is no mistake. But when I change within the config nothing happens again.
-
@pauabaer you needed to escape the \ with another backslash
in the string… its a javascript thingas I noted in my prior post
also remove the leading / -
@sdetweil
I did. But…
I got the feeling i am not far away from the solution. Have still patient to bring me to that point? :)
-
@pauabaer do you still see the same error in the dev console?
-

-
It’s not the error I saw before.
-
@pauabaer ok, i am at grandson baseball for a while
-
@sdetweil
Ok. Let me know when you are back and can help again.
Thanks a lot. -
@pauabaer I’m back
my config for customEvents is
{ keyword: "Gerburtstag", symbol: "birthday-cake", transform: { search: "^([^\\s]+) (\\d{4}) Gerburtstag$", replace: "$1 ($2)", yearmatchgroup: 2 } }my test calendar event title (from the summary field in the actual ICS data) is
SUMMARY:test 1986 Gerburtstagthe debug line in the parser is
[2025-05-25 16:08:47.371] [DEBUG] title: test 1986 GerburtstagI see

I walked thru the code and it worked as expected…
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login