Hi,

at the moment my sites are running under Drupal 6 with nodewords. When I upgrade to Drupal 7 and use Meta tags quick, have I re-enter all metatags or exits another easy way to take the old tags?

regards
Jan

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

valthebald’s picture

No, it's not possible using metatags_quick module (neither with metatags).
You will need to write custom migration scripts (depends on nodewords version you have, but doable).

valthebald’s picture

Status: Active » Postponed
Guo’s picture

hi, valthebald
you mean i even can not migrate from nodeword(d6) to metatages(d7) ?

you know, people who setup their meta name is almost use nodeword in d6 period, so build a upgrade path for migrate nodeword(d6) to meta tage quick(d7) will be more important.

guess what, a 3000+ node website, without your migration path, it is a disaster.

will you consider this feature again?

really thanks~

valthebald’s picture

Version: 7.x-1.7 » 7.x-2.x-dev
Assigned: Unassigned » valthebald
Status: Postponed » Active
Issue tags: +D7 upgrade path, +6x upgrade to 7x

This has officially become a requirement for the forthcoming 7.x-2.0 release

valthebald’s picture

Title: Upgrade from nodewords (D6) possible » Upgrade path from nodewords (D6)
maxiorel’s picture

Hello, I created a module for conversion from Nodewords a few weeks back. Today morning posted is as a sandbox project. Feel free to test it. http://drupal.org/sandbox/maxiorel/1198734

valthebald’s picture

Excellent, I will give it a try tonight

maxiorel’s picture

Maybe it should go to your project instead of the separate module.

valthebald’s picture

That's what I wanted to suggest you. Of course, with mentioning you as primary code author.
I like batch approach for upgrading, the only change that I would make is reading nodewords settings and syncing only relevant data (of course, with extending supported meta tags beyond sweet pair keywords/description). Nice work!

maxiorel’s picture

Fine. Feel free to use it as a base for your improvements. I will be glad if you mention me :-)

valthebald’s picture

Status: Active » Needs review
FileSize
5 KB

Can't test it from my local pc (no nodewords table here)
Please confirm this is working.
Basically, this is maxiorel's code with just modified function names (to match internal module convention)

zambrey’s picture

Thanks maxiorel for starting this. It will save time for many users.

However this integration has some glitches.

First of all: currently it does nothing :) (see 1 & 2)

Notes:
1. Callback for upgrade page should be drupal_get_form
2. Batch can't find metatags_quick_convert_metatags() function because it's defined in separate file
3. There are too many messages, some of them are completely unnecessary
4. Wrong use of $results parameter

Attaching patch which fixes that + some code cleanup.

maxiorel’s picture

Just for note, zambrey... My original migration module http://drupal.org/sandbox/maxiorel/1198734 works, the problem you described is related to Meta tags quick integration I think.

zambrey’s picture

Yeah, I noticed that. No offence.

But if we want to have this feature in metatags quick module we must fix current solution.

Can you test this patch and check if everything is working for you?

valthebald’s picture

Hi guys,
I'm sorry for being inactive for the last week, but I have serious reason - I moved to another place.
Now most things are done, so I can put more attention to the module :)

zambrey’s picture

Hi valthebald. Sorry to hear this. I hate moving to another places :(
Hope everything went smooth for you.

And about the patch... Still there is some work to do here I think.
Now this feature goes through all nodes and then checks the nodewords data for each node.
We must have more efficient way to do this.

Let's say you have 2000+ nodes and most of them are pictures which don't have specified metatags as they are displayed in a gallery or something. So now it would go through all these nodes but only 20 of them have specified metatags.

I hope this description is clear enough to see the big picture.
In other words we should change base table for grabbing data for batch operations :)

What do you think? Sadly I won't have time to change this for about a week but I'm happy to test if you come with solution.

valthebald’s picture

@zambrey:
Moving is ok, if it does not happen too often :)
Regarding your suggestion, I have now real nodewords tables for about 3k nodes, some of them empty (special content types), so I will test first original (maxiorel's) approach, and see how it behaves.

maxiorel’s picture

During the weekend, I tested on a real site with 3500 nodes. It takes very long, about 20 minutes running the Batch API queue.

I'm also not sure what happens on a multilanguage sites. Will this still work?

$node->meta_keywords['und'][0]['metatags_quick'] = substr($keywords['value'], 0, 255);
$node->meta_description['und'][0]['metatags_quick'] = substr($description['value'], 0, 255);

Don't we need something like this?

$node->meta_keywords['LANGUAGE_CODE'][0]['metatags_quick'] = substr($keywords['value'], 0, 255);
$node->meta_description['LANGUAGE_CODE'][0]['metatags_quick'] = substr($description['value'], 0, 255);

I didn't test it on a multilanguage site yet, so this is the reason for my question.

zambrey’s picture

It seems to work fine on my multilanguage site but I'm also not sure if this is the best way to do this.

valthebald’s picture

FileSize
6.76 KB

I have changed
$node->meta_keywords['und'][0]['metatags_quick']
to
$node->meta_keywords[$node->language][0]['metatags_quick']

Also, I combined processed nodes to bulks, so each batch iteration can process more than one node at a time.
Hope this will speed up upgrading of large sites.

valthebald’s picture

Status: Needs review » Needs work

Marking this needs work, since tags other than keywords/description must be addressed as well

valthebald’s picture

Version: 7.x-2.x-dev » 7.x-2.0
Status: Needs work » Fixed

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