I have Meta Tags: Context enabled and I'm editing an existing tag (by path) via the module config (Configuration > Meta Tags)

When I edit the existing description and hit save, the meta description is updated.

However, if I delete the content in the field and hit save, the meta description does not update.

When I click to edit the tag again, the previous value is still in the meta description field.

Only when I delete the contents of the field and add a space will the meta description update as empty be hidden from the page source.

CommentFileSizeAuthor
#2 save_context-1955894-2.patch907 bytesplopesc
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DamienMcKenna’s picture

Component: User interface » Context
plopesc’s picture

FileSize
907 bytes

Hello

I think the problem is related to line 157 in metatag_context.admin.inc file.

When using array_merge, old form values overrides deleted values, which does not appear in $form_state['values']['metatags'].

Attaching patch that works for me.

Regards

plopesc’s picture

Changing status

DamienMcKenna’s picture

Status: Active » Needs review
plopesc’s picture

Status again

DamienMcKenna’s picture

Status: Needs review » Fixed

Good catch, thank you. Committed!

DamienMcKenna’s picture

Status: Fixed » Closed (fixed)

Now that v7.x-1.0-beta7 is out, I'm closing this in the interest of keeping the issue queue clean.