Hi,

Does this module work with entity reference module and fields? if so what is the best practice of setting this up?

thanks!

Stan

Comments

aspilicious’s picture

I think it works out of the box. Just try it with the installation and usage guide. (and report back)

sea4’s picture

Thanks.

I am trying to get it work on drupal 7. but there is little info on setting up for a stage and live site where the live site is updated with new content and want to have a copy of that content on the stage site. The content types have entity references, hence why my interest in this great module.

if i can be pointed in the right direction for my use scenerio, (so far i've followed the setup directions in the D7 documentation) that would be awesome.

aspilicious’s picture

You shouldn't do that :).

Stage ==> Live is the only direction you should use with the deplo module. You can do the same in reverse order but thn you need to do make each server a staging and live server.

sea4’s picture

lol... sorry, that is what i meant.

sea4’s picture

Hi, I am seeing some issues with the nodes that are either referencing or being reference to.

Are there special steps to have nodes (or any bundle or entity) with references (using the entity reference module) deployed.

for example, i have authors content type referencing books where both can authors can have multiple books and books having multiple authors.

1- I've tested using a manual deployment for one book. The book is deployed but without the author.

2 - I've tested using a manual deployment for one author. multiple errors are thrown at the destination server, without success, including PDOException - excerpt below:

PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: 'bd031394-1c06-bbd4-99aa-5673259702e0' for column 'field_books_target_id' at row 1: INSERT INTO {field_data_field_books}...

What is the best practice of migrating nodes with entity references?

Thanks!
Stan

sea4’s picture

Hi, I am seeing some issues with the nodes that are either referencing or being reference to.

Are there special steps to have nodes (or any bundle or entity) with references (using the entity reference module) deployed.

for example, i have authors content type referencing books where both can authors can have multiple books and books having multiple authors.

1- I've tested using a manual deployment for one book. The book is deployed but without the author.

2 - I've tested using a manual deployment for one author. multiple errors are thrown at the destination server, without success, including PDOException - excerpt below:

PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: 'bd031394-1c06-bbd4-99aa-5673259702e0' for column 'field_books_target_id' at row 1: INSERT INTO {field_data_field_books}...

What is the best practice of migrating nodes with entity references?

Thanks!
Stan

seanb’s picture

I also have the errors in #6. It looks like the UUID is not converted to a nid in the destination installation. The related content is also not added to the deployment plan automatically, but even if I add the related content manually, the error still occurs.

I'm not sure if this is a bug for this module, or the UUID modules support for services?

timaholt’s picture

Project: Deploy - Content Staging » Universally Unique IDentifier
Version: 7.x-2.x-dev » 7.x-1.0-alpha4
Component: Miscellaneous » Code

Moving this to UUID, looking at the code this looks like a known issue when deploying a single item with an entity reference. The relevant code is in uuid.core.inc and it's lines 298 - 316.

timaholt’s picture

Status: Active » Closed (fixed)

Confirmed that this issue is solved via the patch in #6 in https://drupal.org/node/1666220. Marking as closed.

timaholt’s picture

Status: Closed (fixed) » Active

Reactivating this as the fix in the other thread stops the error, but doesn't fix the deployment.

timaholt’s picture

Project: Universally Unique IDentifier » Deploy - Content Staging
Version: 7.x-1.0-alpha4 » 7.x-2.x-dev
Status: Active » Needs review

Moving this back to deploy, as this issue is solved by using the "deploy-revisions" branch of the deploy module.

maciej.zgadzaj’s picture

Status: Needs review » Closed (duplicate)

There is no issue with Deploy module - the problems with deployment were causes by UUID module (fixed in #1511274: entityreference_field_uuid_load() and entityreference_field_uuid_presave() use wrong target_type source, even though #1666220: Wrong target_type get from entity reference field. was trying to deal with them too) and Entity Dependency API module (pathc provided in #1545278: Dependencies are not added for entityreference fields (Symptom: "Undefined index: target_type")). Therefore closing as duplicate.