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

Comments

pwolanin’s picture

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.

giorgosk’s picture

Category: bug » feature

Thanks pwolanin

so this is turn into a feature request for the node_clone

moshe weitzman’s picture

Title: node_clone: CCK imagefield is not cloned properly » node_clone: disable by node type

i would like to be able to not ofer cloning on certain node types - the ones that always use imagefield in my case.

pwolanin’s picture

@Moshe- that seems like a reasonable work-around for problematic node type. I'll look into it.

pwolanin’s picture

Status: Active » Needs review
StatusFileSize
new2.64 KB

Attached patch is against the DRUPAL-5--2 branch for this module. Follows more or less the template in og.module.

moshe weitzman’s picture

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'

pwolanin’s picture

StatusFileSize
new2.95 KB

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)?

pwolanin’s picture

StatusFileSize
new2.98 KB

see issue w/ patch for og: http://drupal.org/node/141491

Also, in this patch changed "None" to "none" per core usage.

pwolanin’s picture

StatusFileSize
new3 KB

Also a patch for the DRUPAL-5 branch

pwolanin’s picture

StatusFileSize
new3.2 KB

once more with capitilization fix too.

moshe weitzman’s picture

i am using DRUPAL-5 branch.

i will look into the og issue.

pwolanin’s picture

Status: Needs review » Fixed

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.

Anonymous’s picture

Status: Fixed » Closed (fixed)