MEC Calendar Database Error

Hello,

I am getting an error when trying to use the MEC Calendar. (error log below).

Im kind of new at this, and I wasn’t able to see this posted anywhere else. On the MEC plugin page, I see version 2.6.3 of the MEC calendar, and that there is an update to 2.7.1. Unfortunately, I don’t see where to update this plugin.

So far, I have uninstalled and reinstalled the plugin.

[Tue Apr 24 06:28:18.729769 2018] [:error] [pid 25176] [client 162.158.78.152:19423] WordPress database error Unknown column 'days' in 'where clause' for query SELECT SQL_CALC_FOUND_ROWS  wp_posts.* FROM wp_posts  INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) LEFT JOIN `wp_mec_events` AS mece ON wp_posts.ID = mece.post_id  WHERE 1=1  AND ( \n  wp_postmeta.meta_key = 'mec_start_day_seconds'\n) AND wp_posts.post_type = 'mec-events' AND ((wp_posts.post_status = 'publish')) AND ((`repeat`='0' AND `start`='2020-04-15' AND (`end`='0000-00-00' OR `end`>='2020-04-15')) OR (`repeat`='1' AND DATEDIFF('2020-04-15', start) % rinterval=0 AND `start`<='2020-04-15' AND (`end`='0000-00-00' OR `end`>='2020-04-15')) OR (`repeat`='1' AND (`year`='2020' OR `year`='*') AND\r\n                    (`month` LIKE '%,04,%' OR `month`='*') AND\r\n                    (`day` LIKE ',15,%' OR `day`='*') AND\r\n                    (`week` LIKE '%,3,%' OR `week`='*') AND\r\n                    (`weekday` LIKE '%,3,%' OR `weekday`='*') AND `start`<='2020-04-15' AND (`end`='0000-00-00' OR `end`>='2020-04-15')) OR (`repeat`='1' AND `weekdays` LIKE '%,3,%' AND `start`<='2020-04-15' AND (`end`='0000-00-00' OR `end`>='2020-04-15')) OR (`days` LIKE '%2020-04-15%') OR (`repeat`='1' AND `days`!='' AND `start`<='2020-04-15' AND (`end`='0000-00-00' OR `end`>='2020-04-15'))) AND `not_in_days` NOT LIKE '%2020-04-15%' GROUP BY wp_posts.ID ORDER BY wp_postmeta.meta_value+0 ASC LIMIT 0, 1000 made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_feed, do_action('do_feed_rss2'), WP_Hook->do_action, WP_Hook->apply_filters, MEC_feature_feed->rss2, MEC_feature_feed->fetch, MEC_skins->fetch, MEC_skins->search, WP_Query->__construct, WP_Query->query, WP_Query->get_posts```

So if any advice can be offered I would be grateful.

Thanks!

Hi @alex_watson1993,

Thanks for writing in.

I believe that this is not because of the MEC calendar. This problem happened during the installation of your wordpress. X theme or plugins has no access to the database, but Wordpress has. The theme is just like a skin of your site, all the options uses the function provided by Wordpress which makes the theme indirectly connected to database.

Database connection, selection, queries, and other stuff are done by Wordpress itself. That’s why all database configurations are only available within’s Wordpress’s wp-config.php file. Maybe the issue is the current configuration from your site’s wp-config.php and it doesn’t match your current database.You could contact your hosting in regards to this problem of wordpress installation.

The fix that I could think is to add the missing column in your site or reinstall again your wordpress.

Before reinstalling backup your site so that you could easily setup again your site using the backup.

Let us know how it goes.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.