Importing from b2evolution with 0.9-beta2

Found a bug? Tell us!!
Post Reply
Judebert

Importing from b2evolution with 0.9-beta2

Post by Judebert »

I tried b2evo, but its development community didn't live up to my standards as I tried to port my static site to their blog. Serendipitously, I found this one, and the community seems extremely active and interested.

I'm trying to import my b2evo work. I get:

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /www/j/judebert/htdocs/wasted_youth/include/admin/import.inc.php on line 106

Strangely, it worked for me when I installed 0.8.5 as a test; now that I've moved to 0.9 and a new directory, it's failing.

I did some digging, and found that importers/b2evolution.inc.php is calling importCategory() without passing the database resource. If I add the resource to the call and method declaration (lines 129, 261, and 287), everything imports properly.

However, it looks like the same code was used in 0.8.5. Hmmm. The only differences in the installs (besides the versions) is that I installed 0.9 in a different directory, but in the same database with b2evo -- they use different table prefixes, so they should coexist peacefully.

Anyway, it's fixed for me. I thought you might like to know and fix it for others.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Importing from b2evolution with 0.9-beta2

Post by garvinhicking »

Hi Judebert!

Many thanks for spotting this. In fact in 0.8 versions of s9y the importers were not able to import stuff when the source DB was not the same as the target DB. This was fixed for 0.9 but contained an error for the b2evo importer (and two others) like you mentioned.

I just committed your fix, great! :)

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

See what I mean?

Post by judebert »

See, this is why I like the s9y development community. 8)

If I find anything else, I'll let you know (like I haven't been enough a pain so far). :lol:
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: See what I mean?

Post by garvinhicking »

You haven't been any pain, it's really appreciated. :)

Have a good time with s9y,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply