Update: I figured out this error occurs when you delete a node (and maybe other entities too), they aren't deleted from the plan, and deploy try to push them. So the real solution here is to remove the node from the plan when it's deleted, or should it also be deleted on destination sites when pushing?
After pulling latest dev code, I'm getting this error when trying to deploy some nodes:
EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7501 of /Users/henrique/Sites/drupal7/includes/common.inc).
Comments
Comment #1
aspilicious commentedWhat kinda fields were in the content type you tried to push?
I cannot reproduce (yet)
Comment #2
recidive commentedMaybe that's caused by media module/field. Can you try and confirm that?
Comment #3
aspilicious commentedfunction field_deploy_entity_alter(&$entity, $entity_type) {calls
entity_extract_ids($entity_type, $entity);And that one causes an error, because the bundle property should be part of the entity but isn't.
More info I found:
I'm going to try to reproduce this and print the entity/entity_type in watchdog and see what comes out...
But yeah probably related to media module.
Comment #4
recidive commented@aspilicious: I figured out this error occurs when you delete a node (and maybe other entities too), they aren't deleted from the plan, and deploy try to push them. The error is gone after uninstalling and re-installing deploy module.
I'm gonna edit the issue and change title and description to point this out.
Comment #5
recidive commentedComment #6
aspilicious commentedWhat if we do the following
Create a deploy_entity_delete($entity, $type) { function that reacts on entity deletion.
When it fires we look up the current plans and call deploy_manager_delete_from_plan($plan_name, $entity_type, $entity); on it.
Ok?
Comment #7
aspilicious commentedCould you test this?
ps: I'm not sure were to place this function
ps2: if you got a broken databse before appliying the patch, it's probably the best to clear the deploy_manager_entities table in phpmyadmin
Comment #8
dixon_We should use
deploy_manager_plan_load_all()here, since this is only relevant to managed plans.Otherwise everything looks good here.
Comment #9
aspilicious commentedI also moved the function to deploy.manager.inc
Comment #10
recidive commentedPatch no longer apply. Please re-roll and I'll review.
Comment #11
aspilicious commentedrecidive are you on latest dev? I have no troubles applying the patch. And I rechecked my local commit and I'm one commit ahead of latest commit, so everything should be fine.
(Rechecked several times :p)
Comment #12
recidive commentedOk, I was on another branch and may have a failed rebase and didn't notice it. I'll try it again now.
Comment #13
recidive commentedAlright, confirmed the node is being removed from the plan now.
Comment #14
aspilicious commentedhttp://drupalcode.org/project/deploy.git/commitdiff/d598f3af811c4f45ac22...
Fixed!
Comment #15.0
(not verified) commentedDescribing the real source of the problem.