node clone won't clone repeat...
| Project: | Event Repeat |
| Version: | 5.x-1.1 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed |
Jump to:
I have node clone, event, and event repeat installed on drupal 5.1. Once I create an event, I can clone it, which brings up an edit screen for the cloned object before its entered into the database. Most things about the event are copied, but the repeat section is not.
Node clone offers a hook so that other modules' special clone helper functions can be called during the clone_node function, like so:
<?php
// Let other modules do special fixing up.
// The function signature is: hook_clone_node_alter(&$node, $original_node, $method)
foreach (module_implements('clone_node_alter') as $module) {
$function = $module .'_clone_node_alter';
$function($node, $original_node, "prepopulate");
}
?>This is my first time looking into drupal / drupal module code, so I don't really know what I'm looking for in the eventrepeat module code. I assume I could copy parts of the eventrepeat code that populates the edit view for repeating events, but I don't know exactly where to look.
I did put this into the bottom of event just to look at the arrays being passed around:
<?php
function event_clone_node_alter(&$node, $original_node, $method){
print("starting event node dump\n");
print_r($node);
print("starting event origional_node dump\n");
print_r($original_node);
}
?>But $node and $original_node had the same eventrepeat fields in each array, so the problem isn't there. It may be in the function that builds the >Repeat and >Advanced parts of the form, but again I'm probably in over my head.
If someone could give me a little direction as to where in the eventrepeat.module I should be looking to get node_clone to actually clone repeating events, then I'll post my fix here when/if I have one.
Thanks.

#1
need to look into this.
Thanks
Robert