Error in plugin
-
Our plugin is configured to display popular posts visited within last 7 days. It worked fine up until recently. It looks like the database column name has changed and the query can’t access the right column anymore.
Here’s the error produced on the website:WordPress database error: [Unknown column ‘v.view_datetime’ in ‘where clause’]
SELECT p.ID AS id, p.post_title AS title, p.post_author AS uid FROMwlg_popularpostssummary
v LEFT JOINwlg_posts
p ON v.postid = p.ID WHERE 1 = 1 AND p.post_type IN(‘post’) AND v.view_datetime > DATE_SUB(‘2017-10-18 11:10:08’, INTERVAL 6 DAY) AND p.post_password = ” AND p.post_status = ‘publish’ GROUP BY v.postid ORDER BY SUM(v.pageviews) DESC LIMIT 10;Sorry. No data so far.
When I inspect popularpostssummary DB table, there is no view_datetime column, but there is a last_viewed column now.
Could you please fix?
Thanks!
– Ivan
- The topic ‘Error in plugin’ is closed to new replies.