Closed (fixed)
Project:
Node import
Version:
master
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
30 Dec 2005 at 14:19 UTC
Updated:
22 May 2006 at 09:32 UTC
Jump to comment: Most recent file
Any estimate on when node import will run on Drupal 4.7? I assume this is in the works? Help needed?
Thanks
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | node_import-to-4-7_dado_2.patch | 23.15 KB | dado |
| #6 | node_import-to-4-7_2_dado.patch | 13.9 KB | dado |
| #4 | node_import-to-4-7_1.patch | 11.42 KB | njivy |
| #3 | node_import-to-4-7_0.patch | 11.91 KB | njivy |
| #1 | node_import-to-4-7.patch | 9.58 KB | njivy |
Comments
Comment #1
njivy commentedHere is my attempt to bring this module up to 4.7 compatibility. I tried to stay true to the original intent of the module.
Who commits code?
Comment #2
dado commentednjivy,
you are the king! i was contemplating doing this myself too. I will check your patch within 24 hrs. How laborious was to conversion?
dado
Comment #3
njivy commentedIt wasn't too tedious, thanks to jjeff's form-updating web app.
This patch begins to address some problems with the "global settings" in the UI. I moved the taxonomy-related stuff out of import_flexinode.inc and created import_taxonomy.inc. But the taxonomy work is not done; I've outlined what I think needs to happen in taxonomy_node_import_prepare().
I'm happy to provide patches if someone else handles the bug reports. :-)
Nic
Comment #4
njivy commentedThis patch removes some debugging code fixes and some taxonomy-related problems since the last patch.
Comment #5
njivy commentedBah! I can't type. Just permute my words until they make sense:
"... and fixes some ..."
Comment #6
dado commentednjivy,
i continue to laud your efforts/existance.
i am using PHP5 & ran into some of the usual PHP5 issues. i added a few (array)'s here & there to suppress such errors. I also ran into the issue that PHP5 has slightly different default behavior for strtotime, which causes node.module to hiccup. They seem aware of this because they have this at line ~1557 of node.module
Rather than fix how node.module works (presumably the code was preserved as is for a reason), I added a function to return the current date for the $node->date field
plus reference tot his function in function _node_import_get_nodes.
Anyway, this patch works so far for my PHP5 environment (& I hope a PHP4 environment as well). It includes all your changes plus my small changes. When I say "so far" I mean I have not actually imported anything. I have to fix my CSV sample file and will try again. If you have a quick sample import file, perhaps you could attach? Expect more feedback in ~24 hrs.
As for committing, I do agree it would be easier to commit this stuff rather than generate larger & larger cumulative patches. I think it fair to say that this module is not maintained. I communicated a few months back w/ the maintainer (Robrecht), and he expressed his intent to do this work. However he did not get to it, and he has not answered any emails since. [I do hope all is well!].
I suggest we post 1 more forum topic (in "module development") about our/your taking over maintenance of this? Would you care to do so or shall I?
Comment #7
dado commentednjivy,
so i tried to import a CSV and I am getting an error on line 201 (after all patches including my suggested patch). Line 201 has function form_builder(), which I could not find anywhere. I also see that modules are not expected to call form_render() but instead drupal_get_form(). I am not sure if this is an area where you have made changes or if it is a legacy area of the code?
I also see this above line 201, which looks like it has legacy features
thanks
dado
So am I right that you have not yet fully updated function _node_import_options()?
Comment #8
Robrecht Jacques commentedGreat work!
// Hmm.comments, or at least extend them?the
unsetis not necessary, but I (or was it drumm) thought it was better to clean up the variables that are only related to node_import and don't really exist if you submit a node through the web. Just to avoid side-effects.// Hmm.comments don't really any documentation and/or understanding value.!empty(...) && ...construct in:I prefer an
if-construct. Is this test needed?I'll do some more testing on Monday and you can expect a commit then. I'm sorry I was absent for this long...
Comment #9
njivy commentedHi Robrecht,
I apologize for leaving the "Hmm" markers in the code. In the second case, I am concerned about executing functions whose name is supplied by the user at run-time. But perhaps if we assume that only trusted administrators have access to this module, then security here would not be needed.
I won't be offended if you change the syntax of
!empty($match[$i]) && .... The test is necessary, though, because without it all CSV columns would be imported. This test enables us to skip some columns.Comment #10
dado commentedRobrecht & njivy,
Anything I can do to help? What is the status of Robrecht's work upon njivy's patches? Thanks
Dado
Comment #11
sami_k commentedis there anything i could do to help tie this to taxonomy xml import/export? and to what extent does it tend to import/export taxonomies? can it do a full export with what you're planning because at that point the taxonomy xml import/export module becomes kind of obsolete considering that it uses are rather incompatible xml library leading to a file that is good for import/export only and not really useful for xml manipulation or anything else... i don't want to be replicating your work..
Comment #12
dado commentedI would like to get this going again. Anybody have any more patches or commits? If no reply in a few days then I would probably commit the above patches to CVS and re-start work to fix node_import for Drupal 4.7.
Comment #13
njivy commentedThank you for the initiative, dado. I am not able to pursue this project at the moment.
Comment #14
Robrecht Jacques commentedGo ahead.
Attach the patch here and I'll let you apply it.
Comment #15
dado commentedI believe the attached patch contains all changes from previous patches in this thread. In addition, I
(1) Added slight fix to make 3 date fields work without error
(2) Added new import_location.inc to support location module
(3) Added new import_cck.inc as a first cut at supporting CCK-imported nodes
(4) updated readme.txt
(5) minimal other changes [njivy's work was mighty near complete as far as I can see]
Works for my early testing. I have not looked at nor tested import_flexinode.inc nor import_taxonomy.inc nor import_page.inc
I think it would be neat to dynamically add each applicable vocabulary to the field select box, as a selectable field. Currently import_taxonomy.inc seems to only permit global assignment of taxonomy terms to all nodes imported.
Please post here how it is working.
Regardless, in the spirit of using CVS for its intended purpose, shall I commit?
Comment #16
WithoutaDoubt commentedVery cool. I am just showing support for this project. Good work everyone!
I have patched and am using it on Drupal CVS but am a little confused about the functionality. (I use to be able to use node_import with E-commerce, but now it doesn't quite work the same) Where would I get a guide on how to use node_import for fairly complicated imports....
Multi node, multi table???
I need it to import to a product node (node table) and add fields to another table (ec_products -I guess?).
I know this is kind of specific for here. But I think importing products to E-commerce using node_import would be very useful!!
Thanks,
Tom
Comment #17
dado commentedxtmw,
Thanks for evaluating. If you could comment whether you get importing to work and any problems, that would be helpful.
As for getting it to work with product nodes, you might need to make a import_product.inc or similar code. See the latest README.txt (in latest patch, soon to be committed to CVS). There is an example file which you can refer to. The code is pretty simple. You basically have to declare fields, and the product module will handle how to insert the fields across multiple tables.
dado
Comment #18
dado commentedAll,
I committed the latest patch to HEAD. Robrecht or whoever is owner of this project, it would be good to indicate in project overview that HEAD CVS version is intended for Drupal 4.7.
I look forward to feedback/patches from whoever finds bugs.
Dado
Comment #19
dado commentedI committed more fixes to CVS. Below is my CVS comment. Note that the validation method used previouysly for validating nodes prior to import (using form_set_error, and node_validate which uses form_set_error) presents problems because we cannot (as far as I can see) UN-set form errors. So I removed such node validation. Any suggestions as to how to make this work would be appreciated. I would think they need to change how the new forms API deals w/ errors and/or separate node validation form the form.
added support for importing CCK nodereference field (not fully tested).
changed theming of field matching form to fix bug & better comply w/ 4.7 standard
import location seems to work
had to remove node validation of nodes during import, due to barriers presented by new forms API toward this approach
added validation of node title (must be unique and non-blank)
hard-coded (for now) imported nodes will have status=1 (published). Plan to make these status decisions (front page, sticky, etc.) be configurable
Comment #20
dado commentedI just committed a few more fixes. I think import_event.inc is working now.
CCK's nodereference.module seems to be in a state of flux.
Comment #21
dado commentedcommitted some fixes & new features to head
added installer
improved event importing
fixed nodereference importing
added importing of taxopnomy terms, including inserting new terms when desired
Comment #22
dado commentedagain fixed import_cck.inc to comply with the ever changing CCK modules. now importing these CCK field types works
text
weburl
nodereference
not sure about the others
taxonomy, event & location importing seem to still work.
Comment #23
dado commentedComment #24
dado commentedcommitted to CVS:
added webchick's suggestions to hook_help:
http://drupal.org/node/39223
added BigMoneyJim's patch to import_flexinode.inc
http://drupal.org/node/59934
added fix to import_taxonomy.inc to handle both global terms as well as terms as fields to individual records. hopefully i did not break other (field-based) taxonomy import
Comment #25
Robrecht Jacques commentedModule is being converted to 4.7 using the work of dado and njivy. Thanks!!
Closing this issue. Please open a new issue with a specific bug or feature request.