Importing from Wordpress: Comments are not count [solved]

Found a bug? Tell us!!
Post Reply
Easyfunk
Regular
Posts: 38
Joined: Tue Oct 02, 2007 9:32 am
Contact:

Importing from Wordpress: Comments are not count [solved]

Post by Easyfunk »

Hello!

I just moved from Wordpress to s9y and I'm a new happy user. But I have a problem with importing the comments: They are imported well, but in the metaboxes of each entry they are not count. e.g. there are 5 comments but it displays: Comments (0). Why? New comments will be count.

The Set:

Wordpress 2.2 (UTF-8) (PHP4)
Serendipity 1.2 (native)
PHP 5.2.1
Mysql 5.0.37

I used the import-tool for wordpress.

Thanks for your help!
Last edited by Easyfunk on Fri Oct 05, 2007 10:25 am, edited 1 time in total.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Importing from Wordpress: Comments are not count

Post by garvinhicking »

Hi!

It might have been related to the state of the imported comments, they could have been counted as "pending" instead of "approved", is that possible?

You can fix it by executing this SQL query in phpMyAdmin:

Code: Select all

UPDATE serendipity_entries AS e SET e.comments = (SELECT count(c.entry_id) FROM serendipity_comments AS c WHERE c.entry_id = e.id AND c.status = 'approved') 
HTH,
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/
Easyfunk
Regular
Posts: 38
Joined: Tue Oct 02, 2007 9:32 am
Contact:

Post by Easyfunk »

That exactly did it! I just have to change the prefix i used for my database...

Thanks a lot.
Post Reply