Closed (fixed)
Project:
Nodewords: D6 Meta Tags
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Nov 2009 at 16:27 UTC
Updated:
4 Dec 2009 at 16:30 UTC
There's a mistake at line 1206 in nodewords.module that prevents nodewords such as keywords to appear in the HTML.
"count($result) > 2" should be "count($result) >= 2" or even "count($result) == 2".
Comments
Comment #1
avpadernoThe problem does not allow the correct meta tags to appear in the page in most the cases.
Probably, the default values were used, and in the case the default value was empty (as reported by
empty()), the meta tag was not shown in the HTML output.Thanks for your report, and the help in finding the solution to the issue.
Comment #2
maximpodorov commentedThe latest dev version still doesn't work. Here's the solution:
--- nodewords.module.orig 2009-11-20 14:15:00.000000000 +0300
+++ nodewords.module 2009-11-20 15:38:57.000000000 +0300
@@ -455,7 +455,8 @@
* Implementation of hook_preprocess_page().
*/
function nodewords_preprocess_page(&$variables) {
- $parameters = _nodewords_detect_type_and_ids();
+ $parameters = array();
+ list($parameters['type'], $parameters['ids']) = _nodewords_detect_type_and_ids();
$tags = nodewords_get_tags($parameters['type'], $parameters['ids']);
$output = nodewords_output_tags($tags);
@@ -1205,7 +1206,7 @@
}
if (drupal_is_front_page() && variable_get('nodewords_use_frontpage_tags', TRUE)) {
- return array(NODEWORDS_TYPE_FRONTPAGE, 0);
+ return array(NODEWORDS_TYPE_FRONTPAGE, '');
}
if (!isset($arg[0])) {
Comment #3
avpadernoI have changed the code, and committed it to CVS.
Thanks for the help.
Comment #4
maximpodorov commentedAnd this part fixes nodewords showing on the front page:
@@ -1205,7 +1206,7 @@
}
if (drupal_is_front_page() && variable_get('nodewords_use_frontpage_tags', TRUE)) {
- return array(NODEWORDS_TYPE_FRONTPAGE, 0);
+ return array(NODEWORDS_TYPE_FRONTPAGE, '');
}
Comment #5
avpadernoThanks again for your help!
I changed the code, and committed it in CVS.