node_clone: disable by node type
GiorgosK - February 14, 2007 - 19:59
| Project: | Node clone |
| Version: | 5.x-1.0-beta |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
it actually gets cloned but the original node does not have those images anymore (you have to upload them again)
is that a bug or by design ?
using drupal5.1 and latest CCK and node_clone

#1
This module does not take any special account of CCK, it just calls core API functions.
In general (because of how uploaded files are handled - each associated with a single node) it can't really work well with file/image attachments without specialized code.
Try this patch: http://drupal.org/node/110294#comment-197033
The alternate method of cloning seems to work better for some in terms of uploaded files.
#2
Thanks pwolanin
so this is turn into a feature request for the node_clone
#3
i would like to be able to not ofer cloning on certain node types - the ones that always use imagefield in my case.
#4
@Moshe- that seems like a reasonable work-around for problematic node type. I'll look into it.
#5
Attached patch is against the DRUPAL-5--2 branch for this module. Follows more or less the template in og.module.
#6
code looks sane to me. i think you can compact a bit with node_get_types('names'); which returns an array suitable for form options. also, you have a type - search for 'ehre'
#7
Ok, I think this is good to go.
@Moshe - which branch of the module are you using? Also, I noticed a bug, of sorts, in OG where you must exclude at least one node type from the "Audience targetting system. " (also a typo there). Maybe you can use the same method for OG (patch to follow)?
#8
see issue w/ patch for og: http://drupal.org/node/141491
Also, in this patch changed "None" to "none" per core usage.
#9
Also a patch for the DRUPAL-5 branch
#10
once more with capitilization fix too.
#11
i am using DRUPAL-5 branch.
i will look into the og issue.
#12
Ok, the last relevant patches committed to both the DRUPAL-5 and DRUPAL-5--2 branches.
@Moshe - I'd appreciate if you have time if you could look at this latter branch- the module works by a very different mechanism. It just populates the node form rather than using node_save(). I'm thinking about making this the default download.
#13