Sorry if this is actually something I'm doing wrong. I've just done a fresh install of the Drupal CVS along with the CVS of nodewords but when I attempt to navigate to admin/settings/nodewords I get the error "Call to undefined function: form_textfield() on line 103". This is with everything in it's default settings to rule out any conflicts.

I'm running Apache/2.0.54 (Win32) PHP/5.0.4. I don't have any problems with any other modules although I keep things slimmed down.

Comments

Robrecht Jacques’s picture

Sorry, nodewords hasn't yet be converted to the new 4.7 form api. I have time to do this (quite trivial) tomorrow.

willdashwood’s picture

Oh right, no worries. Thanks for responding so quick! Best of luck with the changes.

ron_mahon’s picture

Title: Call to undefined function: form_textfield() » looking for node words 4.7

I looked in CVS but still cant find it?
Am i lloking in the wrong palce or did you not get time to fix it yet?
Regards
Ron

sugree’s picture

Title: looking for node words 4.7 » patch to support 4.7
Category: bug » feature
Status: Active » Needs review
StatusFileSize
new12.62 KB

I have tried to convert nodewords to support new forms api. Some parts of code are still ugly but works for me. Take a look at my site http://www.howforge.com/ for on-line demonstration.

aries’s picture

Status: Needs review » Reviewed & tested by the community

It seems to me it's working.

matias’s picture

This patch works perfectly for me.
Already using it on www.ipodtotal.com

sugree’s picture

There is a minor bug with localization. Below is the patch to fix this problem.

--- nodewords.module.orig       2006-02-14 17:25:08.000000000 +0700
+++ nodewords.module    2006-02-14 17:26:36.000000000 +0700
@@ -179,7 +179,7 @@
     '#title' => t('Output options'),
     '#description' => t('Check the meta tags you would like to output on each page. Check the boxes in the "Edit" column if you want the edit boxes for the meta tags to appear on the node edit forms. Check the boxes in the "Head" column if you want to output these meta tags on each page.'),
   );
-  $header = array(t('edit'), t('head'));
+  $header = array('edit', 'head');
   $form['output']['#theme'] = 'meta_tags_table';
   foreach (_nodewords_get_possible_tags() as $name) {
       $form['output']['tag']['tag'.$name] = array(
sugree’s picture

Another missing conversion relating to taxonomy as described at http://quiptime.de/drupal/node/139.

--- nodewords.module.orig       2006-02-18 09:03:16.000000000 +0700
+++ nodewords.module    2006-02-14 17:26:36.000000000 +0700
@@ -214,7 +214,7 @@
 /**
  * Implementation of hook_taxonomy().
  */
-function nodewords_taxonomy($op, $type, $object) {
+function nodewords_taxonomy($op, $type, $object = NULL) {
   if ($type == 'term') {
     $id = $object['tid'];
   }
sugree’s picture

StatusFileSize
new13.1 KB

According to my previous patches, I'm not sure that all changes are included. And quiptime suggested me to post the whole patch against cvs again. This patch are made from the running code at www.howforge.com against cvs. Hopefully it works for well for you all.

stefano@tipic.com’s picture

Title: patch to support 4.7 » Wrong fieldset position in node form

The "Meta tags" fieldset in node/add page has the same weight (40) as the Preview button. This makes the fieldset show below the Preview button. A lower value (35, for example) brings the fieldset in the right position:

function nodewords_form_alter($form_id, &$form) {
...................
    $form['nodewords'] = array(
      '#type' => 'fieldset',
      '#title' => t('Meta tags'),
      '#collapsible' => TRUE,
      '#collapsed' => empty($tags['abstract']) && empty($tags['copyright']) && empty($tags['description']) && empty($tags['keywords']),
      '#weight' => 35,
    );
..................
sugree’s picture

Title: Wrong fieldset position in node form » accumulative patch for 4.7
StatusFileSize
new13.1 KB

oops! I have never noticed this weird thing until you pointed it out.

Thanks!

chrisd’s picture

Any chance to get these changes into CVS ?

Thanks,
Chris

sugree’s picture

StatusFileSize
new21.83 KB

For those you can't apply my previous patch, I will post the patched version here.

ron_mahon’s picture

Applied it to 4.7rc2 and it works fine
many thanks
Ron Mahon
http://inmrc.com

ron_mahon’s picture

Spoke too soon!

Right after I edit it if I view the source it’s all there key words description etc. how ever if I go to the page via the breadcrumbs the only Meta data that’s there is default string.

No data and no empty Meta tags.

4.7rc2, PHP 4.3, Linux
Ron

Ryanbach’s picture

Hmm, I need this as well. Good job, tell me if there is any way I can help.

-Ryan

ron_mahon’s picture

Title: accumulative patch for 4.7 » Keywords is not saved

Head from breadcrum: note no keywords

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


Starry Night Cabins at Schroon Lake | Schroon Lake is the Jewel of the Adirondacks

@import "/misc/drupal.css";


@import "/themes/fancy/style.css";

Head after editing from edit page key words are there ?
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


Schroon Lake Cabin Rentals | Starry Night Cabins at Schroon Lake

@import "/misc/drupal.css";



@import "/themes/fancy/style.css";

As you can see the meta data "keywords" get droped?

Regards
Ron

ron_mahon’s picture

StatusFileSize
new2.6 KB

Code from head sections is included in attachment

sugree’s picture

Status: Reviewed & tested by the community » Needs work

Are you using path module? Please remove its alias and try again. If it works correctly without alias, the problem is the detect function. See code below. Default arg in new version are replaced by alias (if I'm not wrong). So this code may not work properly.

  if (arg(0) == 'node' && is_numeric(arg(1))) {
    return array('type' => 'node', 'ids' => array(arg(1)));
  }
  if (arg(0) == 'taxonomy') {
    if (arg(1) == 'term' || arg(1) == 'vocabulary') {
      $ids = preg_split('![+, ]!', arg(2));
      if (count($ids)) {
        return array('type' => arg(1), 'ids' => $ids);
      }
    }
  }
ron_mahon’s picture

Status: Needs work » Fixed

Went back and tried it after 4.7.0 release and it now works fine

Robrecht Jacques’s picture

Assigned: Unassigned » Robrecht Jacques
Category: feature » task
Priority: Normal » Critical
Status: Fixed » Active

Need to check this.

Robrecht Jacques’s picture

Status: Active » Fixed

I believe that all issues raised here are fixed.

Robrecht Jacques’s picture

Status: Fixed » Closed (fixed)