Download & Extend

How to import meta keywords and meta decription

Project:Import HTML
Version:6.x-1.0
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Hello!

I'm trying to import some simple HTML-Files. The problem is, that the code from the example templates doesn't work for me.
There is always just the first letter imported. For example the first keyword is Drupal, then just the letter D is imported, no other keywords. Same with the description.
I use nodewords.

For the reason, that I need just the keywords and the description to be imported I think it must be possible to catch this more directly?
Unfortunately I'm so familiar with XSL. So anybody does have a hint for me?

Comments

#1

I found this too.
It seems the internal data structure of nodewords changed sometime recently, going from a flat string to an array. This is why it's not only saving the first character of the string.

This is fixed in -dev. You can if you like just replace your copy of nodewords.inc with the updated version

#2

Thanx for your answer!

Sorry, but the given links don't work and I can't find a nodewords.inc in the dev-package.

EDIT: The nodewords.inc is in the dev-package of Import HTML. My mistake.

No success with the dev-version of nodewords.inc.

#3

I too am having this issue. When I import html files, I get only the first letter of the meta tags inserted into the nodewords meta tags. I have tried it with both Import HTML 6.x-1.1 and 6.x-1.x-dev, along with Nodewords 6.x-1.11.

#4

Found a solution... note: this is for 6x-1.x-dev

I don't know how to write a patch, so if someone else can that would be great, but here is what worked for me:

In import_html_process.inc remove lines 154-156:
if (module_exists('nodewords')) {
$node->nodewords['description'] = $value;
}

In nodewords.inc (in import_html/modules) change line 18 from:
$node->nodewords['description']['value'][] = $node->description;
to:
$node->nodewords['description']['value'] = $node->description;