Closed (fixed)
Project:
Node clone
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Jan 2009 at 21:58 UTC
Updated:
20 Jan 2011 at 14:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
pwolanin commentedok
Comment #2
deviantintegral commentedWhat sort of problems did you run into? I'd really like to be able to use this with i18n enabled, so I'd be glad to help track this down.
Comment #3
soupp commentedThe main problem was: when you create a cloned node it is recognized by i18n as new translation (of the same language sometimes!). But then you could not chose the next language to translate to (in i18n logic it was done already).
Then if there were the menu item with this node it would sit in the db even after cloned node deletion. So if you will go with translation (but not cloning) the menu item would clash with previously created (which then may unpredictably show up or not).
There were some more. The worst in my situation was that I even could not find a pattern for problem. The project was pretty urgent.
Comment #4
hanoiiAnybody did any further investigation on this subject? I might be need to look at this as well and worth knowing any findings in advance.
Comment #5
pwolanin commentedSounds like in D6 at least the tnid needs to be nulled out?
Comment #6
perandre commentedI'm also interested in your experience with this combo.
Comment #7
asak commentedsubscribing, and will invstigate...
Comment #8
deverman commentedAny news looks like we want to use this module on a multilingual web site
Comment #9
eikes commentedMy wildest guess would be, as pwolanin pointed out, to do this in clone.pages.inc in function clone_node_prepopulate after 115:
no more weird translation issues should arise
Comment #10
deviantintegral commentedLets have a more descriptive title for this.
#9 sounds reasonable to me; I see no reason why cloned nodes should have a translation set.
Comment #11
harrrrrrr commentedanyone tested yet ?
Comment #12
deviantintegral commentedHere is an untested patch that should hopefully do the trick. @harrrrr, it would be great if you could test it.
Comment #13
momper commentedsubscribe
Comment #14
anfrage commentedGot confusing results too. But testing showed the crux of the matter: when creating a duplicate of a node that has a translation the translation is taken into the new duplicated node too. So as the result there is the original node and the duplicated and each of them are concatenated to the same translation. So you'll overwrite the translation of the one node if you are changing it for the other.
So the solution is to disconnect the translation when cloning a node.
This works in my environment by changing the modul code as follows:
node_clone/clone.pages.inc:
function clone_node_save($nid):
within
if (isset($node->nid...add:$node->tnid = NULL;e.g. below
$node->nid = NULL;If you even want to clone the translation when cloning a node - that would be another story... ;-)
But in the mentioned way you get no more failure and node mismatches at least!
This is a non-binding hint...(!)
Comment #15
rapsli commentedpatch works for me.
Comment #16
pwolanin commentedWe need an actual patch please.
Comment #17
rapsli commentedComment #18
pwolanin commentedComment #19
pwolanin commentedLooks basically fine - probably we don't even need the isset.
Comment #20
pwolanin commentedcommitting this patch.
Comment #22
sapox commentedThis means that the issue is completely fixed? If so, why is still the warning in the description page of the module?
Comment #23
un11imig commentedCan we use i18n and node clone now?.
Regards,
Comment #24
un11imig commentedComment #25
edward.kay commentedViewing the source of the latest stable release, I see the patch in #20 is now included. And from my initial tests, it seems to work OK with a multilingual site I'm currently working on.
As this issue appears to be fixed, please can this issue be closed and the warning notice removed from the module homepage.
Thanks
Comment #26
pwolanin commented