* Notice: Undefined variable: nids in node_export_gui() (Zeile 267 von C:\xampp\htdocs\test\sites\all\modules\node_export\node_export.pages.inc).
* Notice: Undefined variable: code_string in node_export_gui() (Zeile 267 von C:\xampp\htdocs\test\sites\all\modules\node_export\node_export.pages.inc).

Line 267: return drupal_get_form('node_export_form', $nids, $code_string);

Can anybody help?

Thank you,
Zucker

Comments

danielb’s picture

Category:support» bug

Nothing you can do about those, will need to fix the code.

danielb’s picture

hmm it isn't obvious what's happening here, I'll see if I can reproduce the error

danielb’s picture

someone else also had this problem, which I marked as duplicate.
#1129588: on export creates an empty file

danielb’s picture

I managed to reproduce this with "Node export code delivery" set to "All of the below options on a page", then using the 'update options' at admin/content to export a node, and then clicking the download button on the export form page.
Now to figure out how that was meant to work :/

danielb’s picture

Hmm it seems the form is losing the information when the button is pressed, but I can't figure out why.

also found another bug which affects this:
line 289 node_export.pages.inc:

      elseif (is_int($node)) {

change to:

      elseif (is_numeric($node)) {
danielb’s picture

Node export gets the $nids and $code_string from a session variable - which it destroys at the time of reading it, sets it in a value field, and then when you hit 'download', drupal rerenders the form, and the session data has been destroyed so the value is missing. So what's the point of submitting the value field? Stupid drupal.

danielb’s picture

Couple things I've tried that have positive results

- not using an array of exports in $_SESSION['node_export'] that get continually destroyed - just having one value that persists in there...
- using a hidden field instead of a value field

I was sure you could pass values through $form_state as well, but those seem to get deleted upon submit just like the value fields.

Well I'll get back to this another time, hopefully with some answers.

danielb’s picture

Status:Active» Fixed

I've gone with the 'hidden' field - that way it's closer to the intended implementation, so we're less likely to introduce new bugs at this stage. Still, the design of the bulk export form leaves a lot to be desired.

Status:Fixed» Closed (fixed)

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

jjclint’s picture

I'm getting the same error messages (on ver 7.3x) taking the steps in #4 more or less.

Here are the errors:

"Notice: Undefined variable: nids in node_export_gui() (line 357 of C:\wamp\www\workshop-base\sites\all\modules\node_export\node_export.pages.inc).
Notice: Undefined variable: code_string in node_export_gui() (line 357 of C:\wamp\www\workshop-base\sites\all\modules\node_export\node_export.pages.inc).
Warning: implode() [function.implode]: Invalid arguments passed in node_export_get_file() (line 465 of C:\wamp\www\workshop-base\sites\all\modules\node_export\node_export.pages.inc).
Notice: Undefined variable: replacements in uuid_tokens() (line 95 of C:\wamp\www\workshop-base\sites\all\modules\uuid\uuid.tokens.inc).
Notice: Undefined index: in node_export_get_file() (line 472 of C:\wamp\www\workshop-base\sites\all\modules\node_export\node_export.pages.inc)."

ajdunlap’s picture

Version:7.x-3.x-dev» 7.x-3.0
Status:Closed (fixed)» Active

I am getting these types of errors when using Node export 7.x-3.0 with Views Batch Operations. When I try to process more than a certain number of nodes, I get the errors

Notice: Undefined variable: nids in node_export_gui() (line 332 of sites/all/modules/node_export/node_export.pages.inc).
Notice: Undefined variable: code_string in node_export_gui() (line 332 of sites/all/modules/node_export/node_export.pages.inc).
giorez’s picture

same issue for me

paul_sgc’s picture

I am also getting this issue with drupal core version 7.17.

It is inconsistent as it does not occur for every export.

When it does occur:

If I export via the menu, I get these errors and no export code.
If I export via the tab on the page, I see the code but the node is not imported at the other end - the import form does not show an error, it just resets the form.

I can supply an export code section which triggers the error if necessary.

Cheers
Paul

anou’s picture

Hello,
For information I got this error when I checked the content type in fieldset "File fields - Files exported for content types" and I could only export nodes one by one. When unchecked, Everything was ok.

Drupal 7.19
Node export 7.x-3.0

dsudheesh’s picture

I had faced the same issue and I am attaching a patch that I have created to fix the issue.

dsudheesh’s picture

Status:Active» Needs review
jackbravo’s picture

Tried this patch, I get no errors now but also no nodes exported on bulk_operations (I'm also exporting files as inline base 64).

ilia’s picture

Yes, this patch doesn't work.

swati007’s picture

I also tried this patch but its not working. Anybody has solution for this issue?

arlingtonvoicellc’s picture

This issue is NOT fixed. This is a persistent issue that destroys Node Export's intended functionality.

I'm experiencing the same issue as everyone else. I've spent hours trying to figure it out and have narrowed it down only slightly.

I've found that SOME nodes are causing Node Export to throw a blank output.

For example, when I tick nodes 1 thru 3 to export, it exports just fine. But add node #4 to the mix, and suddenly it produces a blank result. Remove node #4 but add node #5 and it works fine.

I've examined the nodes that are causing this issues but cannot find anything different from them and the nodes that are exporting just fine. There are no extra fields, no hidden code, no weird taxonomies, nothing. Just the same as all the other nodes, but it's not exporting.

I have applied the suggested patches. Not working. Tried VBO. Same results.

The only thing that fixes the empty export is to disable the exporting of files for the content type. But doing that renders the whole thing useless, as each node has an image attached that needs to carry with it to the new site.

Screenshot 1 - working
Screenshot 2 - not working
Screenshot 3 - working

I'm at a loss. I'm not a code developer, so at the end of the day, a problem like this is at the mercy of those who built the module.