Scenario:

Scenario:

1. Export a sub-set of metatags into a feature.
2. Enable the feature in another database.
3. Attempt to override the sub-set >> values stay with the global ones.

The above occurs because the exported metatag configuration contains the cid ($conf->cid) but it is not saved in the database, so when the overriden configuration is about to be saved, metatag_config_save() sees that there is a $cid and calls drupal_write_record() for update.

I have seen that deleting the cid values at the feature fixes it, but wonder if removing the cid when exporting a feature may cause other side-effects.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

juampynr’s picture

Status: Active » Needs review
FileSize
791 bytes

Here is a patch.

DamienMcKenna’s picture

FileSize
408 bytes

An alternative approach, this flags the 'cid' field to be not exportable; all exports will have to be updated to match, or you could just manually remove the 'cid' value from the exported files.

juampynr’s picture

Status: Needs review » Reviewed & tested by the community

Damien, your patch at #2 works great. It exports the metatags without the cid. I did not know about the no export property. Good to know!

I think this is ready to go.

DamienMcKenna’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.