Closed (fixed)
Project:
Wordpress Import
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
17 Feb 2010 at 01:36 UTC
Updated:
2 Mar 2011 at 03:45 UTC
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
Comment #1
ThomasJaggi commentedSame problem here.
Drupal 6.16
Wordpress 2.9.2
Comment #2
lavamind commentedWhat version of PHP are you using?
This error could be caused by Drupal incompatibilities with PHP 5.3, see #360605: PHP 5.3 Compatibility.
Comment #3
lavamind commentedCould 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.
Comment #4
mark antony commentedYou 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.
Comment #5
gRezes commentedA 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
Comment #6
LeviJackson commentedI 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
Comment #7
shieldss commentedHave 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.
Comment #8
beatnikdude commentedsame error Drupal 6.16 & PHP 5.3.1
Comment #9
atomiclint commentedBump. We're running PHP 5.3.2 and really need to migrate our blog asap. Any help is greatly appreciated.
Comment #10
lavamind commentedOK 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...
Comment #11
atomiclint commentedLavamind, 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.
Comment #12
ssiddireddy commentedThat worked. Thanks for the solution.
Comment #13
mohirt commented#10 worked perfectly, thanks Lavamind.
Comment #14
gonix commentedi 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!
Comment #15
lavamind commentedFix 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
Comment #17
leenark commentedmuch much thanks for this solution. it worked like a charm
Comment #18
mac_weber commentedsolution #10 worked for Drupal 6.20