I am getting the following error after updating MailChimp to version 2.12:

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.list_type' in 'field list': SELECT base.id AS id, base.name AS name, base.mc_list_id AS mc_list_id, base.label AS label, base.description AS description, base.list_type AS list_type, base.settings AS settings, base.status AS status, base.module AS module, base.created AS created, base.updated AS updated FROM {mailchimp_lists} base WHERE (base.name IN (:db_condition_placeholder_0)) ; Array ( [:db_condition_placeholder_0] => weekly_newsleter ) in EntityAPIController->query() (line 187 of /home/xxxxx/public_html/sites/all/modules/entity/includes/entity.controller.inc).

Even if I disable the modules, I am still getting this error on my front page. HELP!

Comments

modctek’s picture

I uninstalled the modules, and that cleared up the error. After reinstalling and configuring, I tried placing the subscription block on the front page again, but immediately got the same error again.

gcb’s picture

Status: Active » Postponed (maintainer needs more info)

Did you update.php and clear cache? Do you have any other code that is manipulating the mailchimp lists? The column that is not being found, base.list_type, is gone. We removed it in favor of a more natural set of settings. Something on your system is still looking for it, it appears. Please make sure the updates have run and that you don't have any other code trying to dig into the list details using the list_type.

modctek’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Very strange. I did make sure to run updates and clear cache, even went in and manually truncated the cache tables in the database and was still getting the error.

Just went back and re-enabled the block and now it works fine, no problems. Maybe it has to do some lingering APC cache issues?

joachim’s picture

Priority: Normal » Critical
Status: Closed (cannot reproduce) » Active

I am seeing this error too.

It's happening on, at least,

- cache clear (including during update)
- mailchimp admin

A backtrace from sites/all/modules/entity/includes/entity.controller.inc shows it's caused by mailchimp_lists_block_info()'s call to mailchimp_lists_load_multiple_by_name().

And the problem in Entity API is because the query that the entity controller builds is using the cached entity info, where the 'list_type' column is still listed.

mailchimp_lists_update_7205() probably needs to explicitly clear both the entity_info and entity_propert_info caches.

joachim’s picture

Hmm, that's still causing the crash when I clear the cache.

Clearing those AND both schema caches did the trick.

On the plus side, it looks like mailchimp_lists_update_7205() ran properly -- my lists have had their new settings' values set. The crash during update was caused (probably) by the update system clearing cache at the end of it all.

erikhopp’s picture

Hi joachim,

I've also run into this error and am trying to fix it. Can you explain a little more about what you did to fix it? How did you clear the entity_info, entity_property_info, and schema caches?

Thanks!

Erik.

erikhopp’s picture

Ok, I probably should have done some more thorough searching before asking my question. I think I've figured out how to do this. For those also interested, I just called the following functions in the _init function of a module that runs on the site:

entity_info_cache_clear();
entity_property_info_cache_clear();
drupal_get_schema('mailchimp', TRUE);
drupal_get_schema('mailchimp_lists', TRUE);

I saved the module, reloaded a page where I knew that module was being loaded, then removed the functions and saved the module.

That seems to have eliminated the errors (at least I haven't found another pages that produced them yet). So hopefully that is it.

If this does indeed work, I would suggest adding this to the MailChimp update.

Thanks for the clues joachim!

Erik.

DamienMcKenna’s picture

Am still having this problem, after running all of the commands Erik posted in #7. On my sites the updates didn't give any errors, but I started getting errors after loading certain pages where the newsletter signup box was displayed. I dug around and found that manually clearing the main cache table via drush resolved the problem for me, e.g.:
drush ev "cache_clear_all('*', 'cache', TRUE);"

jerry’s picture

I just ran into this myself. Damien's suggestion in #8 appears to have cleared it up here as well.

amytswan’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

“And now our watch [for support of the 7.x-2.x version of the MailChimp module] has ended…” With the approaching deprecation of MailChimp’s API version 2.0, I’m sad to say we too must turn the page. This branch will become unsupported in early October and officially deprecated by the end of this year (2016).

Fret not! The 7.x-4.x and 8.x versions come highly recommended. Both are using Mailchimp’s new API 3.0 and are being actively maintained. If you find this issue still exists on either the 7.x-4.x or 8.x branches, let us know by opening a new ticket. “What is dead may never die, but rises again, harder and stronger!”