I have a bilingual site. Previously I was using a language plugin that would store the different languages in the same post which means all my comments belonged to that post. I switched to WPML which manages 1 post per language. In my migration process, I therefore ended up with twice as many posts since the migration tool essentially read each post, took the second language from the post and created a new post with it. Previously
- one post, 2 languages, and a plugin that displays the relevant language
- one comment section no matter the language displaying a mix of comments in both languages
Now with WPML:
- 2 posts, one per language
- the original post contains the primary language and ALL the comments
- the new post contains the secondary language and no comments whatsoever.
That didn't worry me because there are plenty of plugins to copy / move comments from a post to another. So I started migrating some comments from posts in one language to the corresponding ones in a different language. However... I just noticed the ratings did not get copied over. Additionally, when I look at the backend (/wp-admin), I cannot see the ratings inside a given comment.
So... are ratings stored separately? I'm not using any rating plugin AFAIK. This is the core Wordpress feature. Or is there another plugin I'm not aware of that's adding this feature?
Thanks
I have a bilingual site. Previously I was using a language plugin that would store the different languages in the same post which means all my comments belonged to that post. I switched to WPML which manages 1 post per language. In my migration process, I therefore ended up with twice as many posts since the migration tool essentially read each post, took the second language from the post and created a new post with it. Previously
- one post, 2 languages, and a plugin that displays the relevant language
- one comment section no matter the language displaying a mix of comments in both languages
Now with WPML:
- 2 posts, one per language
- the original post contains the primary language and ALL the comments
- the new post contains the secondary language and no comments whatsoever.
That didn't worry me because there are plenty of plugins to copy / move comments from a post to another. So I started migrating some comments from posts in one language to the corresponding ones in a different language. However... I just noticed the ratings did not get copied over. Additionally, when I look at the backend (/wp-admin), I cannot see the ratings inside a given comment.
So... are ratings stored separately? I'm not using any rating plugin AFAIK. This is the core Wordpress feature. Or is there another plugin I'm not aware of that's adding this feature?
Thanks
Share Improve this question edited Apr 7, 2020 at 23:05 fuxia♦ 107k38 gold badges255 silver badges459 bronze badges asked Apr 7, 2020 at 23:02 David BrossardDavid Brossard 1217 bronze badges 4- 3 Comments don't have ratings in WordPress, are you sure this isn't a feature from your theme or a plugin? You'd have to disable them all then enable them 1 by 1 to figure out which one is providing this functionality, then contact their support – Tom J Nowell ♦ Commented Apr 7, 2020 at 23:51
- I went on and inspected the HTML source for one of my posts and figured out which plugin generated the rating based on the CSS class name. I should have known better. Thanks anyway for taking the time. – David Brossard Commented Apr 8, 2020 at 0:45
- 1 No worries, which plugin was it btw? – Tom J Nowell ♦ Commented Apr 8, 2020 at 14:12
- WP Tasty plugin. It lets you rate the recipes – David Brossard Commented Dec 18, 2020 at 19:49
1 Answer
Reset to default 1As stated in the comments below the question,
Comments don't have ratings in WordPress
I went on and inspected the HTML source for one of my posts and figured out which plugin generated the rating based on the CSS class name. I should have known better. The plugin is Tasty Recipes by WP Tasty.
I then looked at my SQL DB and figured out that comment ratings are stored in wp_commentmeta with a key of ERRating:
SELECT * FROM `wp_commentmeta` WHERE meta_key='ERRating'
Here's a more complete SQL statement that shows how to retrieve the rating:
SELECT cment_id,
cment_post_id,
cment_author,
cment_content,
m.meta_key,
m.meta_value
FROM `wp_del201712_comments` AS c
LEFT JOIN wp_del201712_commentmeta m
ON mment_id = cment_id
WHERE cment_post_id = 12066
AND cment_approved = '1'
AND m.meta_key = 'ERRating'
Just replace the post ID with yours to see the results.