Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #2
dbrouard CreditAttribution: dbrouard commentedComment #3
dbrouard CreditAttribution: dbrouard commentedComment #4
fietserwinYou 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.