backdrop-contrib / metatag

Add structured metadata, aka "meta tags", for various pages on your site.
GNU General Public License v2.0
3 stars 15 forks source link

Error on config import: The "instance" attribute does not match the file name #4

Closed jenlampton closed 7 years ago

jenlampton commented 7 years ago

The "instance" attribute has the value "global:frontpage", which does not match the file name "metatag.instance.global.frontpage".

I can't tell if this is a problem with my particular site, or not...

jenlampton commented 7 years ago

okay, this is not limited to one site. It looks like the problem is in hook_config_info() where I specified 'name_key' => 'instance', which then assumes it will match the file name. Since I'm actually using instance throughout the Metatag module, I'm going to add a second key for name that's instance but with the colon replaced with a dot.

jenlampton commented 7 years ago

Okay, I've added both a name and a label key to each instance config file, and provided an update hook. I've run the update hook on my site, and now config files are importing smoothly! woot. Fix has been committed and will be included in the next release.