I have used cvs-version and I have got this error:
warning: Invalid argument supplied for foreach() in /var/www/html/.../sites/all/modules/cvs/wordpress_import.module on line 265.

I have uploaded WP-export-file and have choosen a users and pressed Submit.
Than I got this error.
Thanks.

Comments

vladsavitsky’s picture

Also some empty categories was created while I did import some times.

vladsavitsky’s picture

I have used this plagun to export data from WP:
http://technosailor.com/wordpress-to-wordpress-import/

at line 265:
foreach ($wordpress['categories'] as $key => $value) {
I see an item 'categories' of array $wordpress. But in my case there are no items with name 'categories' in $wordpress.

This is a first lines of dump of $wordpress:

array(2) {
  ["link"]=>
  string(19) "http://bepa.org.ua/"
  ["posts"]=>
  array(95) {
    [""]=>
    string(2116) "<title>Альфа и омега</title>
<link>http://bepa.org.ua/?p=60</link>
<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
<dc:creator>Влад Савицкий</dc:creator>

		<category>Мои работы</category>

<guid isPermaLink="false">http://bepa.org.ua/?p=60</guid>
<description></description>
<wp:excerpt><![CDATA[]]></wp:excerpt>
<content:encoded><![CDATA[Каждый человек может быть одновременно подчинённым и начальником, господином и рабом. Это потому что мы исполняем разные роли в разном окружении. Например, на работе можно быть начальником, а дома рабом...

Именно поэтому, чтобы быть гармоничной личностью, нужно уметь быть и господином, и рабом. При этом нужно разумно выбирать когда и в каком качестве выступать. Дело в том, что те, кому всегда доставалась роль подчинённого считают, что роль диктатора всегда более выиграшна и имеет массу преимуществ. Но на самом деле она как и роль подчинённого имеет свои достоинства и недостатки.

Итак, мы попробуем разобраться в том, какие могут быть отношения с окружающими.

С другими людьми у нас могут быть такие отношения:
<ol>
	<li>Подчинение</li>
	<li>На равных</li>
	<li>Господство</li>
</ol>]]></content:encoded>
<wp:post_date>0000-00-00 00:00:00</wp:post_date>
<wp:post_date_gmt>0000-00-00 00:00:00</wp:post_date_gmt>
<wp:comment_status>open</wp:comment_status>
<wp:ping_status>open</wp:ping_status>
<wp:post_name></wp:post_name>
<wp:status>draft</wp:status>
<wp:post_parent>0</wp:post_parent>
<wp:post_type></wp:post_type>
"
    [1]=>

-----cut-----

yrocq’s picture

Assigned: Unassigned » yrocq
Status: Active » Postponed (maintainer needs more info)

This module imports only WXR files. They are generated by the "Export" menu available in recent versions of Wordpress. Could you try thie method and tell me if you have the same problem ? Thanks !

vladsavitsky’s picture

I have a WP 2.0.7 and there are no "Export" menu. Should I upgade?

vladsavitsky’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

I have upgraded to 2.3.3 and exported to WXR without problems. Thanks.