Hi,

I got the following errors with importing a node of the node-type Web links from a drupal 5 site.

warning: current() [function.current]: Passed variable is not an array or object in /sites/all/modules/node_export/export.pages.inc on line 116. 
warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '_node_form' was given in /includes/form.inc on line 366. 

Thanks a lot in advance for going into this!
Greetings,
Martijn

Comments

summit’s picture

This was the Web links node I wanted to import:

stdClass::__set_state(array(
   'nid' => NULL,
   'vid' => NULL,
   'type' => 'weblinks',
   'status' => '1',
   'created' => NULL,
   'changed' => '1226662389',
   'comment' => '0',
   'promote' => '1',
   'sticky' => 0,
   'revision_timestamp' => '1226662389',
   'title' => 'Zingen rond kerstmis op schitterende stilte plek. ',
   'body' => 'Een week waarin zingen, vrije dans en aandachtsoefeningen centraal staan. Een week om te genieten, te verstillen en in beweging te komen. We gaan uit van een groepsgrootte tussen 12 en 20 deelnemers. We zoeken wel de verstilling van kersttijd, maar we gaan ons niet richten op kerstliedjes oid. Ter afsluiting eigen repertoire en klankimprovisaties zingen in een prachtig barok kerkje vlak over de Duitse grens. Zo kunnen we van de akoestiek genieten.',
   'teaser' => 'Een week waarin zingen, vrije dans en aandachtsoefeningen centraal staan. Een week om te genieten, te verstillen en in beweging te komen. We gaan uit van een groepsgrootte tussen 12 en 20 deelnemers. We zoeken wel de verstilling van kersttijd, maar we gaan ons niet richten op kerstliedjes oid. Ter afsluiting eigen repertoire en klankimprovisaties zingen in een prachtig barok kerkje vlak over de Duitse grens. Zo kunnen we van de akoestiek genieten.',
   'log' => '',
   'format' => '1',
   'uid' => '1',
   'name' => 'superadmin',
   'picture' => '',
   'data' => 'a:4:{s:6:"notify";i:1;s:6:"submit";s:23:"Nieuwe account aanmaken";s:10:"form_token";s:32:"7a0f385e811ac94359759e87ae5279b7";s:7:"form_id";s:13:"user_register";}',
   'url' => 'http://www.passieprojecten.nl/Inc/Home.php',
   'weight' => '0',
   'last_status' => '',
   'last_checked' => '0',
   'click_count' => '0',
   'last_click' => '0',
   'path' => NULL,
   'tags' => NULL,
   'node_weight' => -19,
   'domains' => 
  array (
    -1 => -1,
  ),
   'editors' => 
  array (
  ),
   'domain_site' => false,
   'subdomains' => 
  array (
    0 => 'Vindtocht.nl',
  ),
   'domain_source' => '0',
   'nodewords' => 
  array (
    'description' => 'Een week om te genieten, te verstillen en in beweging te komen. Op zoek naar de verstilling van kersttijd. Ter afsluiting eigen repertoire en klankimprovisaties zingen in een prachtig barok kerkje vlak over de Duitse grens.',
    'keywords' => 'zangworkshop, kerstmis, verstilling',
  ),
   '0' => false,
   '1' => false,
   'last_comment_timestamp' => '1226576203',
   'last_comment_name' => NULL,
   'comment_count' => '0',
   'nodeasblock' => 0,
   'page_title' => false,
   'taxonomy' => 
  array (
    1704 => 
    stdClass::__set_state(array(
       'tid' => '1704',
       'vid' => '109',
       'name' => 'Kerst',
       'description' => 'Kerst',
       'weight' => '0',
    )),
    3397 => 
    stdClass::__set_state(array(
       'tid' => '3397',
       'vid' => '109',
       'name' => 'kerstvakantie',
       'description' => '',
       'weight' => '0',
    )),
    3322 => 
    stdClass::__set_state(array(
       'tid' => '3322',
       'vid' => '109',
       'name' => 'Spiritueel',
       'description' => 'Spirituele vindtocht',
       'weight' => '0',
    )),
    2076 => 
    stdClass::__set_state(array(
       'tid' => '2076',
       'vid' => '138',
       'name' => 'Winterswijk',
       'description' => '',
       'weight' => '0',
    )),
    3174 => 
    stdClass::__set_state(array(
       'tid' => '3174',
       'vid' => '109',
       'name' => 'Zangworkshops',
       'description' => '',
       'weight' => '0',
    )),
  ),
   'files' => 
  array (
  ),
   'menu' => NULL,
))

Just to make you test it yourself.

Greetings,
Martijn

danielb’s picture

from the looks of it I have stuffed up the D6 version, will get back to you

danielb’s picture

Version: 6.x-1.0 » 5.x-1.2-alpha1

oh

danielb’s picture

Can you please confirm which version of Drupal you have, and which version of the module it says you have on your admin/build/modules page?

Something is fishy. You say you have drupal 5, but the error is a drupal 6 error (i can tell by the filename given).

danielb’s picture

Status: Active » Postponed (maintainer needs more info)
summit’s picture

Hi,

it is a node which I want to copy from D5 to a D6 site. Is this may be the problem?
That would be great to do with this module, so upgrading is more easy for sites with only 20x nodes.

Greetings,
Martijn

danielb’s picture

yes that's the problem!
Haven't really thought about this - I will investigate it soon

danielb’s picture

Status: Postponed (maintainer needs more info) » Active
danielb’s picture

Title: Importing Web Links fails » Moving nodes from Drupal 5 to 6
no2e’s picture

Is moving nodes from 5 to 6 possible now? If not, will it be?
(I'm unsure, because the last release is from 28th Nov, same as the last posts of this issue)

danielb’s picture

nope, haven't looked at it yet

summit’s picture

Category: bug » feature

Please no2e, give Daniel some space. one week...He said he will look into it. Give hime some time to investigate.
I set the issue to feature request because it is not a bug.
Daniel, great you will look into it, it would be absolutely great for small sites to export from 5 to 6 or visa versa and upgrade the site with this tool that easy!

greetings,
Martijn

Steve Halleman’s picture

I too am trying to export from a 5.14 site to a 6.8 site and am getting the same errors:

* warning: current() [function.current]: Passed variable is not an array or object in C:\wamp\www\sites\all\modules\node_export\export.pages.inc on line 116.
* warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '_node_form' was given in C:\wamp\www\includes\form.inc on line 366.

This would be a very good feature to have. Are there any plans to provide something like this?

Regards,

Steve Halleman

danielb’s picture

I've made the Drupal 5 node code the same as the Drupal 6 code. So it should have some compatibility now. Let me know if you run into any problems.

danielb’s picture

Status: Active » Fixed

I'll mark as fixed, please start a new issue for any problems that come up.

Status: Fixed » Closed (fixed)

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

avolve’s picture

I have received a very similar error — also exporting/importing from D5 - D6.



    * warning: current() [function.current]: Passed variable is not an array or object in /Applications/MAMP/htdocs/sandon/sites/all/modules/node_export/export.pages.inc on line 128.
    * warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '_node_form' was given in /Applications/MAMP/htdocs/sandon/includes/form.inc on line 366.


Would it be far more effective to create a sandbox of the D5 site, upgrade to D6 and then re-attempt?

danielb’s picture

What versions of the modules are you using? (hint: do not use version 6.x-2.x for cross-version exports)

avolve’s picture

I will double check — have had problems with all methods i have attempted thus far.