Comments

Status: Needs review » Needs work

The last submitted patch, HEAD.patch, failed testing.

mikran’s picture

Parent issue: » #1707058: Relation 7.x-1.0

Status: Needs work » Needs review

mikran queued HEAD.patch for re-testing.

Status: Needs review » Needs work

The last submitted patch, HEAD.patch, failed testing.

mikran’s picture

Something weird is happening, I'm getting different results locally

Starting test RelationMigrateTestCase.                                                                                                                                                             [ok]
Relation Migrate test 180 passes, 0 fails, 16 exceptions, and 56 debug messages                                                                                                                    [error]
mikran’s picture

I figured that out, for some reason testbots use outdated version of Migrate.

mikran’s picture

Status: Needs work » Needs review
StatusFileSize
new555 bytes

As this is now blocking work on other issues here is a patch that disables relation_migrate tests completely. for now.

  • mikran committed 79871eb on 7.x-1.x
    Issue #2397171 by mikran: Disabled relation_migrate tests temporarily to...
mikran’s picture

Title: The relation_migrate submodule is not compatible with latest Migrate » The relation_migrate submodule is not compatible with latest Migrate 2.6
Status: Needs review » Active
mikran’s picture

mikran’s picture

Parent issue: #1707058: Relation 7.x-1.0 »
osopolar’s picture

What does it need to make relation_migrate compatible with Migrate 7.x-2.8? Where are the incompatibilities? I currently need to add relations (between two nodes and between a field-collection and a node) by a custom migration.

mikran’s picture

Status: Active » Needs review
StatusFileSize
new555 bytes

I don't know but let's see how the testbot behaves nowadays...

mikran’s picture

Title: The relation_migrate submodule is not compatible with latest Migrate 2.6 » The relation_migrate submodule is not compatible with latest Migrate 2.8

Status: Needs review » Needs work

The last submitted patch, 13: 2397171-13.patch, failed testing.

osopolar’s picture

Status: Needs work » Needs review
Parent issue: » #1606404: Migrate integration & upgrade from *reference
StatusFileSize
new2.11 KB

I used this tutorial to get migration for relation to work. I copied the destination handler (relation_migrate.destination.inc) in a custom module, to don't conflict on relation upgrades and modified it. Basically I removed 'not null' => TRUE, from getKeySchema(), and added following to fields: fields().

    $fields['entity_id_source'] = t('Relation: Entity ID Source');
    $fields['entity_id_destination'] = t('Relation: Entity ID Destination');

I added the patch for that, but currently I am to busy to test it. But let's see if it works.

I also added my Migration class (uses Drupal-to-Drupal data migration) to show how I have implemented the handler. In the child classes I only have to refine the the query and in hook_migrate_api() I added the relation like that:

function custom_migrate_migrate_api() {

    // ...

    'RelationXxxToYyy' => array(
      'class_name' => 'CustomRelationXxxToYyyMigration',
      'description' => t('Migration of relations between Xxx and Yyy.'),
      'destination_type' => 'relation_xxx_to_yyy',
      'endpoint_source_type' => 'node',
      'endpoint_destination_type' => 'node',
      'relation_source_migration'  => 'Xxx',
      'relation_destination_migration' => 'Yyy',
      'relation_table' => 'tabble_xxx_to_yyy',
      'relation_table_source_id' => 'id_xxx',
      'relation_table_destination_id' => 'id_yyy',
      'dependencies' => array('Xxx', 'Yyy'),
    ),

    // ...

That way different relation migrations could be defined without much coding.

osopolar’s picture

StatusFileSize
new3.78 KB

Added relation-base.inc.txt, as relation-base.inc was not uploaded in #16.

Status: Needs review » Needs work

The last submitted patch, 16: relation-migrate-2397171-16.patch, failed testing.

  • mikran committed a13867e on 7.x-1.x
    Revert "Issue #2397171 by mikran: Disabled relation_migrate tests...