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.

Files: 
CommentFileSizeAuthor
#2 metatag-n1852022-2.patch408 bytesDamienMcKenna
PASSED: [[SimpleTest]]: [MySQL] 11 pass(es).
[ View ]
#1 metatag-cannot-override-imported-1852022-1.patch791 bytesjuampy
PASSED: [[SimpleTest]]: [MySQL] 11 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new791 bytes
PASSED: [[SimpleTest]]: [MySQL] 11 pass(es).
[ View ]

Here is a patch.

StatusFileSize
new408 bytes
PASSED: [[SimpleTest]]: [MySQL] 11 pass(es).
[ View ]

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.

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.

Status:Reviewed & tested by the community» Fixed

Committed.

Status:Fixed» Closed (fixed)

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