I noticed this when working with deploying an entity using UUID + Deploy. This was also with the revisions patch recently committed and entity translation. Essentially I couldn't get metatags to deploy successfully. Normally only the source language would deploy with no alternative languages working.

I traced this to when deployment happens the metatags array is sent over differently then metatag_metatags_save expects in that it expects to only perform a single save vs one for each defined language.

I have attached a patch that will no doubt need some improvements but does solve the problem I have been experiencing.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sylus’s picture

sylus’s picture

FileSize
1.82 KB
sylus’s picture

Status: Active » Needs review
sylus’s picture

Issue summary: View changes
DamienMcKenna’s picture

Status: Needs review » Needs work

Where does $new_language come from?

sylus’s picture

FileSize
1.45 KB

Good catch!

This might mean I won't need that extra logic so attaching an updated and simpler patch.

sylus’s picture

Status: Needs work » Needs review
sylus’s picture

Updating for the extremely awesome beta8 release. ^_^

DamienMcKenna’s picture

Thanks for the reroll. What version of Deploy did you test this with, alpha2 or the dev release?

DamienMcKenna’s picture

I'm inclined to suggest the extra code should go right into metatag_entity_insert..

sylus’s picture

Hey! ^_^

Yeah using latest dev with the following patches:

projects[deploy][version] = 2.x-dev
projects[deploy][subdir] = contrib
projects[deploy][type] = module
projects[deploy][download][type] = git
projects[deploy][download][revision] = 3566fb6
projects[deploy][download][branch] = 7.x-2.x
projects[deploy][patch][1604938] = http://drupal.org/files/deploy-1604938_1.patch
projects[deploy][patch][2052767] = http://drupal.org/files/deploy-undefined_variable_user-2052767-3.patch
projects[deploy][patch][2092335] = http://drupal.org/files/deploy_new_alter_hook-2092335-4.patch

I am also using the following: Make File for my deployment workflow as a whole but shouldn't be relevant I don't think.

We have tested this patch and deployment of metatag seems to work great now based on our testing but would definitely like someone else to confirm solves issue.

sylus’s picture

Updating patch.

sylus’s picture

Updated patch.

sylus’s picture

Final patch that seems to be working for deploy and checks for services on the destination side. Note the addition in hook_entity_update.

Status: Needs review » Needs work

The last submitted patch, 14: metatags_deploy_support-2166769-14.patch, failed testing.

sylus’s picture

FileSize
1.94 KB

Whoops bad syntax.

sylus’s picture

FileSize
2.29 KB

One more time...

sylus’s picture

Status: Needs work » Needs review
SebCorbin’s picture

I'm encountering an issue with Entity Translation and Metatags and I'm not sure if this is related: when reverting a revision with translations, the metatags of translation don't get reverted.

Please tell me if this issue id really about that so I can try to test/review/modify the patch

sylus’s picture

FileSize
2.18 KB

I don't think this patch will resolve your issue but likely it has been solved in a later version of metatags.

I have attached an updated patch to latest dev post v1.4.

sylus’s picture

Status: Needs review » Closed (works as designed)

Hmm it actually looks like this patch isn't needed at all anymore. Deploy is working out of the gate so something got fixed and improved in later metatag releases.

This makes me a very happy camper. Thanks so much for all of the work!

DamienMcKenna’s picture

I'm very happy to hear it :-)