4

I using Data export import module in my new Drupal 7.

I imported Drupal 6 database into Drupal 7 site.

But unfortunately the node id for the same article is different.

How do I fix this?

1 Answer 1

3

You can use UUID module, some quote from module page :

This module provides an API for adding universally unique identifiers (UUID) to Drupal objects, most notably entities. Features in Drupal 7 version Automatic UUID generation

UUIDs will be generated for all core entities. An API is provided for other modules to enable support for custom entities. UUID API for entities, properties and fields

With this unified API you can load entities with entity_uuid_load() so that all supported properties and fields are made with UUID references. You can also save entities formatted this way with entity_uuid_save() (depends on Entity API). Export entities to use as default/demo content

The integration with Features module provides the ability to export UUID enabled entities with intact dependencies and references to other entities. This functionality depends on Deploy module 7.x-2.0-alpha1 (soon to be released) and is probably the most robust way for installation profiles and distributions to provide demo content!

The problem is that Drupal uses serial ids for the content (nodes), so if we have the same site installed different places, the id for the same content most likely will be different. (fx in one environment the node id might be 137, while it on another might be 153) This makes it very hard to track changes on the same content in different environments. The idea with UUIDs is to create a id that is the same on all environments.

3
  • Is this module installed in Drupal 6 or Drupal7? Or both have to? @zhilevan Commented Oct 13, 2015 at 6:13
  • @JasonJason in both
    – Yuseferi
    Commented Oct 13, 2015 at 6:26
  • @JasonJason you're welcome
    – Yuseferi
    Commented Oct 13, 2015 at 6:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.