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.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | multi_node_add_module.txt | 10.1 KB | Levistica |
Comments
Comment #1
Levistica commentedThe 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.
Comment #2
aron novakThank 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?
Comment #3
aron novakNo response for several months and seems to work with recent CCK, closing.
Comment #4
seehawk commentedReopening. 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.)
Comment #5
seehawk commentedOn 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.
Comment #6
aron novakThanks 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.
Comment #8
gintass commentedProblem still exists.
Drupal 6.22
CCK 6.x-2.9