Closed (fixed)
Project:
Node factory
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
8 Apr 2008 at 05:47 UTC
Updated:
28 Aug 2008 at 09:13 UTC
Jump to comment: Most recent file
When will a version of node_factory be released for Drupal 6? Or can anybody tell me what to change. I tried node_factory for drupal 6 but it did not work. It seems that the vid is not generated automatically. How can I adapt the code?
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | node_factory.info_.txt | 173 bytes | jp.stacey |
Comments
Comment #1
clemens.tolboomAs node_factory is in its infancy for D5 I do not dare to release it for D6.
If you provide a patch I will create a branch for D6 which will probably stay in dev for a long time.
I really want the CCK integration done first in the D5 version.
For a working D6 you need at least at core compatibility to .info
That the vid is not generated is weird afaik because drupal should do that.
Cheers,
Clemens
Comment #2
kyle_mathews commentedI need to port this module for a project I'm doing in the next couple of weeks -- has there been any progress towards a Drupal 6 port that I can piggyback on?
Comment #3
jp.stacey commented@scoorch: in node_save() there's logic to (a) detect if there's no nid and set is_new = TRUE (b) detect is_new and run _node_save_revision() with no existing vid. So it should be working. However, the node your code is currently working on doesn't have the new vid attached to it by these functions - you might have to go back to the database with node_load() to get that.
@clemens.tolboom: could you leave the specifics of the CCK integration out of the node factory module, but permit CCK modules to do it for you? E.g. node factory's CCK integration could just search all CCK modules for a hook to import the relevant field. That way each CCK module owner separately can integrate with node factory, if they want to do the work... ;)
@kyle_matthews, @clemens.tolboom: I'd be interested in helping port this to D6, although I don't have a great deal of time free. @clemens.tolboom, what functionality do you think might be affected by the list of upgrade requirements at http://drupal.org/node/114774 ?
Please find attached a possible .info file for a D6 version. @clemens.tolboom, I've commented out a dependency on the node module and also a PHP minimum requirement, so please review and see what you think.
Comment #4
jp.stacey commentedI can confirm that, for the simplest of nodes (no CCK fields), node_factory_create_node() and node_factory_save_node() have just worked for me. However, node_factory_save_node() doesn't seem to return anything, and doesn't add an nid to the array passed to it, so it's difficult to obtain the nid for that node. You *could* get the most recently created nid from the database, but that might result in race conditions, especially if you're creating a lot of nodes.
Comment #5
clemens.tolboomhmmm ... where's my post ?
node_factory_save_node returns a nid. See #214257: retrieving node->nid and #288719: node_factory_save_node returns node
For this issue to be clear please create separate issues for separate problems :p
Comment #6
jp.stacey commentedclemens.tolboom: sorry, wires got crossed! (Thanks for adding the nid feature re: those two other issues.)
Could you get a list together of what would get the module out for D6, at least as an alpha, and maybe people can help move towards that? I find node factory very useful for importing from other data sources and am glad to help.
In fact, do we now have enough to create a dev branch, with the .info file, as you mention here? Comment #4 confirms that basic nodefactory functionality works under D6.
Comment #7
clemens.tolboomThere is now a totally untested version available.
I hope someone finds the time or gives me money to do a complete test on especially the CCK interface.
Comment #8
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.