CCK Fields that are part of multiple content type definitions are not recognized by the module. I will try to fix the problem on my own and commit the solution.

Anyway it is a pretty brilliant and expedient module. Thanks for that.

CommentFileSizeAuthor
#1 multi_node_add_module.txt10.1 KBLevistica

Comments

Levistica’s picture

Status: Active » Patch (to be ported)
StatusFileSize
new10.1 KB

The problem lays in the function "content_fields" of the cck module. The function provides only the information for the field instance in a given type. It fetches from the cached data built by _content_type_info(). (Related "Issue": http://drupal.org/node/333387). I fixed the problem by replace this function by the function content_field_instance_read (the needed include content.crud.inc of the content module has to be loaded). After that it worked fine for me.

The changes were made in line 86 and following:

// CCK fields
module_load_include('inc', 'content', 'includes/content.crud');
if (function_exists('content_field_instance_read')) {
$fields += content_field_instance_read(array('type_name' => $type));
}

I additionally added the patched modulefile to this issue.

aron novak’s picture

Status: Patch (to be ported) » Postponed (maintainer needs more info)

Thank you for the detailed error report!
However I use 6.x-2.6 of CCK and i cannot reproduce this bug. (and yeah, i could reproduce it with some older versions)
Instead of handling CCK's issue in this module, i'd simply document the fact that the module requires at least CCK 2.6.
Do you agree?

aron novak’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

No response for several months and seems to work with recent CCK, closing.

seehawk’s picture

Title: Overall CCK Fields are not shown » CCK Fields that are shared between 2 or more content types are not recognized
Version: 6.x-1.0-beta1 » 6.x-1.0-beta2
Status: Closed (fixed) » Active

Reopening. This is still an issue in beta2.

The module doesn't appear to recognize CCK fields that are shared between two different content types. CCK stores each such field in its own table, prefixed with "content_field", rather than as part of the "content_type_[type]" table.

(Just as an aside, The Node Import module handles these fields nicely, so that module/maintainer may be a useful resource.)

seehawk’s picture

Priority: Normal » Critical

On further thought, I'm bumping this up to critical. For nodes that have shared fields that are also required fields, the nodes are being created, but can only be accessed in the Content area of the administration menu. You have to then edit the node in the standard node edit page and add the values to the required fields in order to have the node appear on the site. So, if you have required shared fields, this module ends up severely hobbled.

aron novak’s picture

Status: Active » Fixed

Thanks for the fix Levistica, i committed your code. I could reproduce the issue finally with very recent cck and your code just did the job.

Status: Fixed » Closed (fixed)

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

gintass’s picture

Problem still exists.

Drupal 6.22
CCK 6.x-2.9

  • Commit 43f1bfb on master, 6.x-1.x, 7.x-1.x, 8.x-1.x by Aron Novak:
    #672212 by Levistica (http://drupal.org/user/463868) , shared cck fields...