Page 1 of 1

Importing from Wordpress: Comments are not count [solved]

Posted: Fri Oct 05, 2007 10:00 am
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!

Re: Importing from Wordpress: Comments are not count

Posted: Fri Oct 05, 2007 10:09 am
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

Posted: Fri Oct 05, 2007 10:25 am
by Easyfunk
That exactly did it! I just have to change the prefix i used for my database...

Thanks a lot.