node_import support
catch - April 22, 2009 - 12:40
| Project: | Restricted content |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Description
Started work on this but despite no errors, nothing's getting saved when running the actual import, which suggests idiocy somewhere along the line. Also couldn't find many multiple checkbox examples in node_import's current support to tell me where that idiocy actually is.
Here's the .inc so far which at the moment needs to be dropped into node_import/supported
| Attachment | Size |
|---|---|
| restricted_content.inc_.txt | 659 bytes |

#1
What a pain, but got it working.
Two main issues - node_import doesn't appear to support #tree => TRUE (or I can't work out the desired syntax).
$form['state']['values']['nid'] is empty when submitting the form via node_import, so had to do select max(nid) + 1 to fake it.
Here's the patch I'm using - both are really issues with node_import and the fixes aren't nice, so don't expect it to be committed, but fyi.
#2
And the .inc which works with the above patch.