d5 version doesn't work for cck fields

WorldFallz - May 16, 2008 - 16:37
Project:Integrated Metatags
Version:5.x-1.0-beta
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

The d5 backport doesn't appear to be working:

  1. small error: won't enable, need to remove comma from int_meta_cck.info on "dependencies = int_meta,content" line
  2. large error: cck fields don't appear properly on the "metatags" tab. On line 42 of int_meta_cck.module there is no 'columns' key in the fields array so it throws an error.

I wanted to be able to give you a patch so I spent quite some time trying to grok cck field structure in d5, but I couldn't get it work. I couldn't find the d5 equivalent of "field_[fieldname].value" or how to get it.

#1

fractile81 - May 16, 2008 - 16:39

I'll look at it within the next week, and try to get a new BETA out. Sadly, the D5 version was more an afterthought due to demand, so it's the D6 version that I put most of my time/testing into. Thanks for your help though, and I'll see what I can get going!

#2

WorldFallz - May 16, 2008 - 16:39
Title:d5 version doesn't work» d5 version doesn't work for cck fields

clarified title

#3

WorldFallz - May 16, 2008 - 16:42

no problem-- i'm just surprised I couldn't easily find out how to retrieve the d5 equivalent of field_[fieldname].value. I imagine it has to be documented somewhere-- but i'll be d@mned if I could find it and I'm usually pretty good at searching d.o. and googling drupal. It's probably something so stupid simple it doesn't need documenation, but I'm not seeing it. I'll keep plugging along though-- i may get lucky, lol.

#4

WorldFallz - May 21, 2008 - 13:55

I think I've got this working-- so far so good. I tried to roll a patch for you against the current DRUPAL-5 branch, but cvs diff is having trouble with mac/windows matching and is trying to replace the entire module.

Here's the code for the affected function from int_meta_cck.module:

<?php
/**
* Keeps track of the supported fields by this module.
*/
function int_meta_cck_supported($arg) {
 
$fields = array();
  if (!empty(
$arg)) {
   
$type = content_types($arg);
    if (!empty(
$type)) {
      foreach (
$type['fields'] as $name => $info) {
        foreach (
array_keys($info['columns']) as $col) {
          foreach (
$type['fields'] as $name => $info) {
            foreach (
$info as $col) {
             
$fields[] = $name . '.value';
            }
          }
        }
      }
    }
  }
  return
$fields;
}
?>

#5

WorldFallz - May 21, 2008 - 13:55
Status:active» patch (code needs work)

forgot to change status

#6

fractile81 - May 22, 2008 - 20:23

Thanks for the code, and the patience. I'm still working on getting everything setup to get this applied and a new beta out (old dev server appears to have crashed).

#7

fractile81 - June 28, 2008 - 02:42
Status:patch (code needs work)» fixed

This should be fixed in the new 5.x-1.0-BETA2 branch. Thanks for your help in this! Let me know if there are any problems with it.

#8

Anonymous (not verified) - July 12, 2008 - 02:44
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.