Hi!

I cloned some nodes which had an availability calendar. I've just found that all the cloned nodes share the same calendar cid. I know it's not a bug, so my question is, is there a way to ( programmatically ) update/create a new calendar cid on a node?

My bet would be:

1. Create programmatically a new calendar
2. Assign it to cloned node

But I can't find how to create a new calendar using code ...

FIXED ... blame on me: availability_calendar_create_calendar()

Comments

dbrouard created an issue. See original summary.

dbrouard’s picture

Issue summary: View changes
dbrouard’s picture

Issue summary: View changes
fietserwin’s picture

You could set cid to 0 or remove the A.C. field record for the cloned node. A.C. is smart enough to create a calendar for you once you edit the cloned node.