Trying out this wonderful module and I receive the following error: "warning: Parameter 1 to wordpress_import_process_blog() expected to be a reference, value given in C:\xampp\htdocs\drupal\includes\batch.inc on line 189." Nothing is imported although it reports that all was successful.

Comments

ThomasJaggi’s picture

Same problem here.

Drupal 6.16
Wordpress 2.9.2

lavamind’s picture

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

What version of PHP are you using?

This error could be caused by Drupal incompatibilities with PHP 5.3, see #360605: PHP 5.3 Compatibility.

lavamind’s picture

Title: warning: Parameter 1... » warning: Parameter 1 to wordpress_import_process_blog() expected to be a reference

Could you please try replacing line 707, from :

$operations[] = array('wordpress_import_process_blog',array($wordpress_import));

to

$operations[] = array('wordpress_import_process_blog',array(& $wordpress_import));

And try the import again.

mark antony’s picture

You mean in the wordpress_import.module file?

Tried it, didn't work. :(

After reading the warning on the top of this page (http://drupal.org/node/307956), I checked whether drupal was already compatible with PHP 5.3. It seemed to be, so I installed PHP 5.3.1. I'll try to revert to XAMPP 1.7.1 and see if that helps.

gRezes’s picture

A few details:

1) I am running PHP 5.2.12 on Windows 2003 through IIS.

2) I changed line #707 as you suggest in wordpress_import.module and imported a new Wordpress blog (from the same WPMU server) and this time it worked.

3) The import worked but the following error was produced, "warning: Invalid argument supplied for foreach() in [path]\wordpress_import\wordpress_import.module on line 768.

-Gerald

LeviJackson’s picture

I tried that using XAMPP + PHP 5.3.1 locally.

I changed line 707 and received this error:
warning: Parameter 1 to wordpress_import_process_blog() expected to be a reference, value given in C:\xampp\htdocs\drupal614\includes\batch.inc on line 189.

I then tried it on my live site which runs PHP 5.2.11 and all of the posts were moved over with no issue at all.

If you would like or need anymore info let me know.

Levi

shieldss’s picture

Have there been any updates on this issue? I am receiving this same error with Drupal 6.16 and PHP 5.3.2. Our current work around is to run Drupal on a temporary server with PHP 5.2.13, import our Wordpress blog, then copy the database to the production site.

beatnikdude’s picture

same error Drupal 6.16 & PHP 5.3.1

atomiclint’s picture

Bump. We're running PHP 5.3.2 and really need to migrate our blog asap. Any help is greatly appreciated.

lavamind’s picture

OK could you try this, replace line 726 from :

function wordpress_import_process_blog(&$wordpress_import, &$context) {

to

function wordpress_import_process_blog($wordpress_import, &$context) {

Let me know how that goes.

Unfortunately I can't test it myself yet, I don't have complete control over my current test rig...

atomiclint’s picture

Lavamind, your solution allowed import of all my posts. Thank you.

The only problem I've encountered is the mishandling of YouTube embeds, but that may have been unavoidable. I get code such as

[youtube=http://www.youtube.com/watch?v=aWbVogqxGrs&hl=en_US&fs=1&]

instead of an embedded player. I'd appreciate a private message/email if anyone has a quick solution to that.

ssiddireddy’s picture

That worked. Thanks for the solution.

mohirt’s picture

#10 worked perfectly, thanks Lavamind.

gonix’s picture

i edited my wordpress_import.module by doind the #10 comment but it doesnt work for me. It shows a white blank page when clicking the next button right after i uploaded my wxr file. and when i clicked in next, it says its was imported successfully.

Im using php 5.3.1 and drupal 6.17 locally.

Thanks!

lavamind’s picture

Version: 6.x-2.0 » 6.x-2.x-dev
Status: Postponed (maintainer needs more info) » Fixed

Fix as specified in #10 committed to 6.x-2.x-dev.

@gonix: I suspect you could be experiencing a different problem than related to PHP 5.3. If you still have difficulty importing, please open a new bug.

@atomclint: Please refer to #644900: Convert wordpress.com embedded video tags to proper embed code

Status: Fixed » Closed (fixed)

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

leenark’s picture

much much thanks for this solution. it worked like a charm

mac_weber’s picture

solution #10 worked for Drupal 6.20