Hello everyone,

I am trying to mantain sincronized two sites with d2d_migrate module and I have entity_translations module active.
When I try to get records from the legacy, I get translations almost correctly, but indexes are wrong. I put an example to view in the best way.

path (String, 47 characters ) colegio-mayor-argentino-nuestra-senora-de-lujan
body (Array, 2 elements)
0 (String, 1108 characters ) <p><strong>This Nuestra Se&ntilde;ora de Luj&aa...
1 (String, 1342 characters ) <p><strong>El colegio mayor argentino&nbsp;&ldq...
body:summary (Array, 2 elements)
0 (String, 101 characters ) This residence is primarily intended for Argent...
1 (String, 112 characters ) Este centro esta dirigido prioritariamente a es...

If you check some correct node with devel, we can watch another structure for body, for example. Also, I don´t know which language it is, so I can not construct the correct structure at prepare function, for example. I can do it, but only If I construct a query... etc.

body (Array, 1 element)
es (Array, 1 element)
0 (Array, 5 elements)
value (String, 20 characters ) <p>Pruebaaaaaaaa</p>
summary (String, 0 characters )
format (String, 9 characters ) full_html
safe_value (String, 21 characters ) <p>Pruebaaaaaaaa</p>
safe_summary (String, 0 characters )

Please, correct If I am doing something wrong or tell me If there is another way to solve my problem.

Thanks to all.

Comments

mikeryan’s picture

Title: Translates don´t work properly » Translations don´t work properly
Status: Active » Postponed (maintainer needs more info)
Issue tags: -d2d, -migrate

7.x-2.0 is quite old and there's been a lot of work since then - I recommend trying 7.x-2.1-rc1 with Migrate 2.6, there's not much point to trying to debug on 2.0.

I'm not entirely clear on what the issue is here - when you say the indexes are wrong, do you mean that the body and summary indexes should be, say, 'en' and 'es' instead of 0 and 1?

Note that entity_translation is a contributed module, migrate_d2d has no direct support for it.

daniroyo’s picture

Thanks for your reply and for your corrections :)

You are right, I would say that I expected that source rows had a similar structure that destination at prepare function, I mean, an array indexed by field_name, language, delta and, at the end, by name of the parameter (value, format (in case of text field for example), or other parameter´s names. IT is clear that if a get all params, attributed included separattely, the last index is not necessary.

At this moment, with result given, I couldn´t know which language has the retrieved node. If not, how Could I sincronize translations nodes by fields between sites with d2d_migrate module? In other words, I need to know wich language has each field. I don´t mind If I have to rewrite getSourceValues, but I imagine It will have another best way to do that.

I will test with rc1, but I think It will be the same. I understand that entity_translations is a contributed module and for that reason,It is possible this module has not supported. Then, translations by fields are not supported in d2d_migrate, no? I suppose translations is supported when node is translated sepparattely in different nodes, but not with translations by fields.

I am not sure I have explained my problem well, let me know if not.

Thanks a lot again, you have done a really nice work with site´s migrations.

daniroyo’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Hi again,

I have tested rc1 and although the module continues retrieving data at the same way, It works properly assigning languages correctly between sites, althoug I don´t understand exactly how it works at all, hahaha.

Sorry for my disturb.