Comments

levacjeep’s picture

Let me know if you need a hand with this, I wouldn't mind contributing some code as I am working on a project that requires this functionality.

Cheers,
Jean-Pierre Levac

gdd’s picture

StatusFileSize
new3.09 KB

A long time coming but here is a patch to try

gdd’s picture

Status: Active » Needs review
StatusFileSize
new2.7 KB

Sorry that had some debug crap in it, here's a new patch

dixon_’s picture

Status: Needs review » Needs work

Is this fixed in HEAD? All code seems to be there except this part from the latest patch:

+++ modules/node_deploy/node_deploy.module	5 Mar 2010 15:21:09 -0000
@@ -94,6 +114,18 @@ function node_deploy($nid) {
+  // If this node was translated from anotehr node, then set the node's
+  // tnid properly as well.
+  if ($node->tnid) {
+    if ($node->tnid == $node->nid) {
+      $node->tnid = $remote_nid;
+    }
+    else {
+      $uuid = deploy_uuid_get_node_uuid($node->tnid);
+      $remote_key = deploy_get_remote_key($uuid, 'node');
+      $node->tnid = isset($remote_key['nid']) ? $remote_key['nid'] : NULL;
+    }
+  }
gdd’s picture

Hm, both those hunks appear to have been added already by accident at this commit

http://drupalcode.org/viewvc/drupal/contributions/modules/deploy/modules...

I need to resolve that against the code I'm currently running on the client site I wrote this for. I could swear the second hunk went in deploy.module and not node_deploy.module. I'll look into this.

csavio’s picture

Subscribing. Did all of this patch get implemented in 1.1.2.3?

gdd’s picture

Status: Needs work » Fixed

Yup looks that way. Marking this fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

longwave’s picture

Status: Closed (fixed) » Active

Reopening this as I think I have discovered a bug. If you deploy a node that has translations, you must ensure that the source node for the translation exists on the destination before the translations get pushed over.

This is triggered if you are pushing new content in multiple languages, including the source translation node; you currently can't guarantee the order that the nodes will be created in, and if the translations end up being pushed before the source translation node, the translations will not be linked correctly.

longwave’s picture

Status: Active » Needs review
StatusFileSize
new1.47 KB

The attached patch tries to ensure the deployment order is correct when deploying a new node and any translations as part of the same plan.

I am not sure the plan item weight system was meant to be used in this way - there is no API call for what the patch does, but this approach seems to work so perhaps one should be added.

longwave’s picture

StatusFileSize
new1.46 KB

Typo in the SQL statements in that patch. Use this one instead.

dixon_’s picture

Issue tags: +beta blocker

I will take a closer look into this before rolling the beta. Adding tag for that.

dixon_’s picture

Status: Needs review » Closed (duplicate)
Issue tags: -beta blocker

Actually, I'm closing this one as a duplicate of #766806: Weight between items will break deployment if dependencies are added by hand in wrong order where we should try to solve this in a more general manner.

RichaDaffodil’s picture

Version: 6.x-1.x-dev » 6.x-1.0-alpha1

I am also facing this issue. When i am deploying nodes with translation then on destination server tnid is saved to 0. I am using deploy module version 6.x-1.0-alpha2. Does it have all commits that are mentioned?