Invalid argument supplied for foreach() lines 838 and 182

jesss - February 13, 2009 - 16:12
Project:Wordpress Import
Version:6.x-1.0
Component:User interface
Category:bug report
Priority:critical
Assigned:Unassigned
Status:fixed
Description

I'm trying to import a Wordpress 2.5.1 blog into Drupal 6, but I'm getting error messages at the mapping step.

    * warning: Invalid argument supplied for foreach() in /var/www/html/newauthor/sites/all/modules/wordpress_import/wordpress_import.module on line 838.
    * warning: Invalid argument supplied for foreach() in /var/www/html/newauthor/sites/all/modules/wordpress_import/wordpress_import.module on line 182.

In the user mapping fieldset, I don't have any options, even though there are users in my Wordpress blog, and I created users in my Drupal installation.

Any ideas on what I need to do in order to get this module to work?

#1

yrocq - February 22, 2009 - 00:27
Status:active» postponed (maintainer needs more info)

I need the wxr file to investigate this bug. Could you send me a private message with a link from which I could get it ?

#2

jesss - February 23, 2009 - 17:44

Sent. Let me know if you need anything else, or if there's anything I can do to help track this down.

#3

aktary - May 22, 2009 - 22:25

I have the same problem. I get those warnings, then, if I proceed with the import, I end up with:

    * warning: Invalid argument supplied for foreach() in /mnt/stor2-wc1-dfw1/397326/www.alibrown.com/web/content/sites/default/modules/wordpress_import/wordpress_import.module on line 367.
    * warning: in_array() [function.in-array]: Wrong datatype for second argument in /mnt/stor2-wc1-dfw1/397326/www.alibrown.com/web/content/sites/default/modules/wordpress_import/wordpress_import.module on line 377.
    * warning: array_merge() [function.array-merge]: Argument #2 is not an array in /mnt/stor2-wc1-dfw1/397326/www.alibrown.com/web/content/sites/default/modules/wordpress_import/wordpress_import.module on line 406.
    * warning: Invalid argument supplied for foreach() in /mnt/stor2-wc1-dfw1/397326/www.alibrown.com/web/content/sites/default/modules/wordpress_import/wordpress_import.module on line 512.
    * warning: Invalid argument supplied for foreach() in /mnt/stor2-wc1-dfw1/397326/www.alibrown.com/web/content/sites/default/modules/wordpress_import/wordpress_import.module on line 367.
    * warning: in_array() [function.in-array]: Wrong datatype for second argument in /mnt/stor2-wc1-dfw1/397326/www.alibrown.com/web/content/sites/default/modules/wordpress_import/wordpress_import.module on line 377.

The Wordpress blog has been successfully imported (0 users, 0 posts, 0 categories and 0 comments).

Was this ever figured out?

#4

aharown07 - May 26, 2009 - 22:09

I am having almost exactly the same problem as #2. (By "almost exactly" I mean that so far I don't see anything different).

Edit: our wordpress db has not been converted from anything else prior to that as far as I know.

#5

aharown07 - May 26, 2009 - 20:23
Status:postponed (maintainer needs more info)» active

#6

aktary - May 26, 2009 - 21:12

It may help to know that we tried to follow the procedure outlined here: http://jms.suite505.com/?q=node/9

#7

aharown07 - May 27, 2009 - 16:21

I made another attempt. Not sure what I did differently, but this time the import proceeded normally until some time after keying in email addresses for the newly created accounts.
Then I got the white screen of death.
Error log indicated timeout in pathauto. So I'm not sure I have this particular issue anymore.

Edit: Some things I did differently that may be helpful to some... ran my upgrade from 2.0.6 to 2.5 again (my Wordpress is too old to export). Also emptied some tables. Namely, emptied comments. We use a forum for comments so everything in there was spam anyway. Also emptied links. (I don't know if that is a standard wp table or created by some plugin, but we have a different setup in Drupal so... no need for them).

#8

lavamind - December 9, 2009 - 05:04
Status:active» fixed

The issues raised in the report are most likely fixed in 6.x-2.x-dev

Feel free to reopen if you still have these problems.

 
 

Drupal is a registered trademark of Dries Buytaert.