CCK images not imported

artatac - June 21, 2009 - 22:38
Project:Node Export
Version:6.x-2.12
Component:Code
Category:bug report
Priority:normal
Assigned:James Andres
Status:active
Description

Getting the following type of errors when importing to and from the latest drupal 6 sites

But I am also trying to understand if you need to match such things as content types, taxonomy BEFORE you attempt this???

warning: Invalid argument supplied for foreach() in D:\xampp\htdocs\610start03\sites\all\modules\cck\content.module on line 1238.
warning: Invalid argument supplied for foreach() in D:\xampp\htdocs\610start03\sites\all\modules\cck\content.module on line 1278.
warning: Invalid argument supplied for foreach() in D:\xampp\htdocs\610start03\sites\all\modules\cck\content.module on line 1278.
warning: Invalid argument supplied for foreach() in D:\xampp\htdocs\610start03\sites\all\modules\cck\includes\content.token.inc on line 39.
user warning: Duplicate entry '/feed-' for key 2 query: INSERT INTO url_alias (src, dst, language) VALUES ('node/48/feed', '/feed', '') in D:\xampp\htdocs\610start03\modules\path\path.module on line 112.
Unknown error occured attempting to import file.
warning: Invalid argument supplied for foreach() in D:\xampp\htdocs\610start03\sites\all\modules\cck\content.module on line 1238.
warning: Invalid argument supplied for foreach() in D:\xampp\htdocs\610start03\sites\all\modules\cck\content.module on line 1278.
warning: Invalid argument supplied for foreach() in D:\xampp\htdocs\610start03\sites\all\modules\cck\content.module on line 1278.
warning: Invalid argument supplied for foreach() in D:\xampp\htdocs\610start03\sites\all\modules\cck\includes\content.token.inc on line 39.
user warning: Duplicate entry '/feed-' for key 2 query: INSERT INTO url_alias (src, dst, language) VALUES ('node/49/feed', '/feed', '') in D:\xampp\htdocs\610start03\modules\path\path.module on line 112.

#1

artatac - June 21, 2009 - 22:46

To help further I made a copy of my working site and its database then on the copy site I deleted ALL the content. I then did a copy and paste between them - using this module and still I got the errors below so it's not a difference in taxonomy or no matching node type - please advise thanks

Joe

=====

warning: Invalid argument supplied for foreach() in D:\xampp\htdocs\610startextra07b\sites\all\modules\cck\content.module on line 1244.
warning: Invalid argument supplied for foreach() in D:\xampp\htdocs\610startextra07b\sites\all\modules\cck\content.module on line 1284.
warning: Invalid argument supplied for foreach() in D:\xampp\htdocs\610startextra07b\sites\all\modules\cck\content.module on line 1284.
warning: Invalid argument supplied for foreach() in D:\xampp\htdocs\610startextra07b\sites\all\modules\cck\includes\content.token.inc on line 39.
Unknown error occured attempting to import f

#2

artatac - June 21, 2009 - 22:55

I further created a new content type on both sites (testing TYPE) and then created a node and copy and pasted between the sites - still

======

warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '_node_form' was given in D:\xampp\htdocs\610startextra07b\includes\form.inc on line 366.

=======

#3

danielb - June 21, 2009 - 23:53

The call_user_func_array error is a bug in your version of the module. Not sure about the other stuff, might need some more info to reproduce the problem.

#4

artatac - June 22, 2009 - 09:51

Sure - I appreciate the quick response. I could:
zip the site and the db and send you a url link to it
if you email me direct joe AT venturacottage.com I can give you the user 1 name and password
Or I can do whatever else would help resolve this

thanks

Joe

#5

danielb - June 22, 2009 - 10:46

Have you tried the latest release ?

#6

artatac - June 22, 2009 - 18:20

Hi Daniel

Just grabbed it and it is a lot better - They do get imported (I did 3 nodes at a time) you get an error warning followed by a confirmation that they were imported (see below)

Home » Administer » Content management
Content
Unknown error occured attempting to import file.
Unknown error occured attempting to import file.
Unknown error occured attempting to import file.
Imported Apple and Strawberry Waffle
Imported Orange fanto
Imported First Story

It has the taxonomy wired correctly but has lost its cck image (but is definitley included in the export code)

Regards joe

#7

danielb - June 22, 2009 - 22:24

This would be regarding the node_export_file module then, sorry I've never tried it.

#8

danielb - June 22, 2009 - 22:33
Title:warning: Invalid argument supplied for foreach» CCK images not imported
Version:6.x-2.9» 6.x-2.12

#9

James Andres - June 22, 2009 - 22:39
Assigned to:Anonymous» James Andres

artatc, can you save the node_export dump as a .TXT file and upload it here? Also, are you attempting to export a CCK filefield? Currently the imagefield, mediafield, etc.. are not supported. Only filefield is supported at this time.

#10

artatac - June 23, 2009 - 07:40

I was keen to try node import file to handle export of cck fields but the attachment at http://drupal.org/node/449872 does not unzip correctly is it available elsewhere please or have you got a copy?

Thanks Joe

#11

artatac - June 23, 2009 - 08:37

OK - I created three new pages that had taxonomy BUT no cck fields - They imported perfectly so well done all involved with this module. The scenario that I am trying to create is that a client with a large Drupal 5 site comes and wants a Drupal 6 site. I have tried many times to 'upgrade' and always found that I end up starting from scratch and manually recreating every node! I thin with what I have seen with your module I should be able to install the version 5 of your module on the old site > content > select all > Export nodes > copy. Then manually recreate the taxonomy structure and any extra content types on the new empty drupal 6 site. And then on the Drupal 6 site Import. That would make migration a single day's job rather than something never to be attempted! - well done for such a useful addition to the Drupal armoury .

#12

danielb - June 23, 2009 - 08:54

It comes with Node Export, you just have to activate it seperately on the module page. Only available in drupal 6 though.

#13

artatac - June 23, 2009 - 08:56

To test the theory I created a new book with logical child pages in the original website 610startextra07 all about oranges see
http://venturacottage.homedns.org/610startextra07/main-book-page-about-o...
and all its logical child pages.
I then copied and imported them into my 'new' website 610startextra07b - no errors but as you can see (perhaps correctly) it loses the book structure - see
http://venturacottage.homedns.org/610startextra07b/main-book-page-about-...
As requested I have attached the import text and also (as they are both just test sites) you are welcome to log on and look further user 1 logon is webmaster with a password of demo
Hope that this is valuable feedback
Regards

Joe

AttachmentSize
main_orange_import.txt 29.81 KB

#14

danielb - June 23, 2009 - 09:14

Yeah books don't get preserved, it would probably have to be a plugin module to export entire books to do that, in a similar way that Book Copy plugs into Node Clone

Here are some modules to help you manually structure books
http://drupal.org/project/skeleton
http://drupal.org/project/outline_designer

#15

artatac - June 23, 2009 - 10:24

Interesting news - I have configured node export file and created a new node with a cck image field image on it

on import you get

Unknown error occured attempting to import file.

and no image

However if in advance you copy across the original images from sites/default/files (which makes sense) you get the thumbnail showing up correctly in the Create story page BUT a warning message
[Referencing to the file used in the field is not allowed.]

If you then press save at the bottom you are thrown back to a blank Import page see attached screenshot attached

AttachmentSize
test2.png 77.35 KB

#16

James Andres - June 23, 2009 - 20:56

It looks like you are on a Windows machine. Are you running Drupal on an Apache/IIS server on Windows also? Or is it being served from Linux, or other UNIX?

I haven't tested this on a Windows server yet...

Can you upload the node export from that test2.png you showed?

Thanks,

James.

#17

artatac - June 24, 2009 - 06:52

Recreated the issue and it hapened as before so here is the export file attached. If it helps I do have a mac and coulp probably recreate the sites on that. Also If you want to do testing on a windows PC happy to give you remote access via log mein.com

regards

joe

AttachmentSize
james_export.txt 4.35 KB

#18

GiorgosK - October 7, 2009 - 10:35

If you need to import/export between test server (localhost probably) and live server
That the following steps have to be followed when importing/exporting files in order not to get

# Unknown error occured attempting to import file.

1. on admin/settings/node_export check Local file export mode
2. export node(s) to be imported later
3. upload the files referenced in the node(s) above usually in sites/default/files
(files from test site go to your live site, the module does not do this automatically or does it ?)
4. now you can import the nodes in your live site

Maybe this should be part of help text in the file transfer mode (probably in the settings page)

#19

GiorgosK - October 7, 2009 - 10:36

Trying a different setup
When I use Remote file export, URL I get following error

warning: fopen(19c4124a2722fbc00d659492f883732c.txt) [function.fopen]: failed to open stream: Permission denied in /home2/liveserver/public_html/sites/all/modules/node_export/modules/node_export_file/node_export_file.module on line 411.

#20

James Andres - October 14, 2009 - 08:33

Remote file mode relies on the ability for site #1 to download from the files directory in site #2. To be honest, I haven't tested the functionality in a while, but the gist is:

In site #1, when node export is being performed

  1. Get the contents of the "filepath" column for any attached files. This should be something like "sites/all/files/foo.gif" or "files/bar.jpg"
  2. Make the export path an absolute URL to the filepath, eg: "http://www.site1.com/sites/all/files/foo.gif".

In site #2, when node import is being performed

  1. Get the export path from the export text, should be an absolute URL as described above.
  2. Attempt to download the file in the export path URL, save it to the local files directory

Of course, this all relies on the assumption that server #1 and server #2 are online and available to eachother. If these are "development" sites or are protected by passwords, you will likely have trouble.

Cheers,

James.

#21

jdwfly - October 16, 2009 - 20:59

I didn't get any errors during import of nodes using a remote file export option, but it didn't transfer the files to the site #2. I had to manually transfer the files over and then it worked.

 
 

Drupal is a registered trademark of Dries Buytaert.