I've exported nodes to a file using the command "drush node-export-export --type=about_us,page --file=content_about_department.inc" and when I try to import it another site(in same content type) using command "drush node-export-import --file=content_about_department.inc" or through web interface "node/add/node_export", I'm getting the following error message.

Fatal error: Call to undefined method stdClass::__set_state() in /sites/all/modules/node_export/formats/drupal.inc(22) : eval()'d code on line 2

Thanks a lot in advance for replying!

CommentFileSizeAuthor
#2 ContentType.png52.1 KBpijus
#2 content_about_department.txt120.47 KBpijus

Comments

danielb’s picture

Status: Active » Postponed (maintainer needs more info)

Can you please post a sample node export that causes this problem? It would be best to try and figure out if it's a specific node or set of nodes causing this?

pijus’s picture

StatusFileSize
new120.47 KB
new52.1 KB

Thank you.
I've attached the content type screenshot and node exported file.

Looking for your kind help.

danielb’s picture

Can you find out what PHP versions you have on the two sites?
This export looks a bit different to the exports I expect.

Are you using the same version of Node Export on both sites?

Have you tried exporting without drush?

danielb’s picture

The code in drupal_var_export() explicitly prevents the __set_state() magic method, yet I'm seeing it in your code.
Is there any way your nodes might not be stdClass ?

pijus’s picture

Status: Postponed (maintainer needs more info) » Active

I'm using the PHP 5.3.5 version and the both the sites in the same local environment. Also I'm using same node_export module.

Yes, I've tried without drush also. I've tried to import a single node from admin UI. I'm getting the same error in all the cases.

I'm not sure how the nodes will be without stdClass.

If you have any test export then please provide me.

danielb’s picture

Ensure you are using the latest version of Node export. If this problem continues, try exporting to a format other than 'Drupal'. It seems to be producing unusable exports in your case, but I cannot reproduce it.

danielb’s picture

Status: Active » Closed (cannot reproduce)

I hope the idea of using a format other than 'Drupal' is suitable for you.

I can't reproduce this problem, I have no idea how the __set_state stuff got into your export when the code explicitly prevents that from happening.

UNLESS you are using an old version of something (the module, or drupal) which might explain it.

pijus’s picture

What do you mean by other format than Drupal? If you have any example file and module (that worked for you) then please provide me.

I've used the latest version of the node export module. I will try with the other one.

Also it will be grateful if you plz suggest the configuration (PHP and the Drupal) to make it work.

pijus’s picture

Status: Closed (cannot reproduce) » Needs work

What do you mean by other format than Drupal? If you have any example file and module (that worked for you) then please provide me.

I've used the latest version of the node export module. I will try with the other one.

Also it will be grateful if you plz suggest the configuration (PHP and the Drupal) to make it work.

danielb’s picture

Status: Needs work » Closed (won't fix)

huh?

This module comes with various formats for exports, e.g. Drupal, XML, DSV, and Json

If you don't know of this, then I'm not sure I want to accept bug reports from you.

pijus’s picture

Status: Closed (won't fix) » Closed (fixed)

Thanks Daniel. The JSOn, XML and DSV is working. I've tried with one node and it's working.

christenson’s picture

Priority: Critical » Normal

I had this same issue on a local environment, using the latest version of Node Export and Features. I changed the export format to JSON and it worked as expected.

revnoah’s picture

I can also confirm that changing the default format to JSON works, and that this problem still exists. It would be simplest to just change the module's default format to JSON if var_export is unreliable.