I'm sure I'm being daft but I can't see how to import an exported metatag definition. I've the classic development/test/production type environment and I want to copy my metatags from the development to the test (and obviously eventually the production) site. Am I missing something obvious?!

Thanks

Comments

damienmckenna’s picture

How do you export the other content?

PedroKTFC’s picture

I just used the export link in the metatag UI (after editing the metatags). It gives me a window with something as I've shown below. I was assuming I'd have to copy and paste it into a file and then import it on my other sites.

$config = new stdClass();
$config->disabled = FALSE; /* Edit this to true to make a default config disabled initially */
$config->api_version = 1;
$config->instance = 'global:frontpage';
$config->config = array(
'title' => array(
'value' => '[site:name]',
),
'description' => array(
'value' => 'My description text blah blah.',
),
'keywords' => array(
'value' => 'fred, john, may',
),
'news_keywords' => array(
'value' => 'fred, john, may',
),
'canonical' => array(
'value' => '[site:url]',
),
'shortlink' => array(
'value' => '[site:url]',
),
);

damienmckenna’s picture

No, I mean if you're trying to load content, i.e. nodes etc, from the dev to production sites, how do you get the other content over?

PedroKTFC’s picture

Ah! To date I've mainly managed to backup and restore my database as the production site has no user modified content. But that is now changing and I won't be able to get away with that any more (except going in reverse, production to development, of course). I've exported/imported views and I've looked at features and patterns which seem to do what I need in some areas.

damienmckenna’s picture

Status: Active » Fixed

Oh, I see what you mean. If you don't want to use Features to manage your configuration, you should use hook_metatag_config_default() as described in the metatag.api.php file.

PedroKTFC’s picture

In the end I've gone for the deploy and configuration management modules (the latter because it seems to be the way D8 is going). However, I'd only set a specific metatag for the front page yet it didn't seem to transfer; I had to set a global metatag for it to transfer.

Status: Fixed » Closed (fixed)

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

anybody’s picture

Issue summary: View changes

What about a simple UI page for importing the exports directly in Metatags? (Like other modules do?)

Features is very heavy for some pages...

anybody’s picture

Status: Closed (fixed) » Active
sphism’s picture

Ummm... so i can export metatags but not import them?? That's a bugger.

damienmckenna’s picture

Version: 7.x-1.0-beta7 » 7.x-1.x-dev
damienmckenna’s picture

Title: How to import exported metatags » Add a page for importing Metatag configurations
Category: Support request » Feature request
coozila’s picture

subscribe

epringi’s picture

This would make sense.

xaa’s picture

I agree this would make sense. Why provide an export UI if import is impossible?