Forum

Thread tagged as: Error, MailChimp

Mailchimp app sync issues

Hi!

I updated the Mailchimp app for Perch. Also updated Perch core so the app can function.

I deleted the database tables as suggested in the documentation.

I get Campaigns from Mailchimp, but can't the other lists.

On cron I get error:

FAILED | MailChimp | import_data | Reasons.

Perch: 2.8.29
Production mode: Production (100)
Installed apps: content (2.8.29), assets (2.8.29), categories (2.8.29), perch_forms (1.8.3), perch_mailchimp (3.0)
DB driver: PDO
DB tables: perch2_categories (0), perch2_category_counts (0), perch2_category_sets (0), perch2_content_index (9260), perch2_content_items (740), perch2_content_regions (101), perch2_forms (1), perch2_forms_responses (27), perch2_mailchimp_campaigns (14), perch2_mailchimp_imports (0), perch2_mailchimp_lists (0), perch2_mailchimp_subscribers (0), perch2_mailchimp_subscriptions (0), perch2_mailchimp_webhooks (0), perch2_navigation (0), perch2_navigation_pages (0), perch2_page_templates (3), perch2_pages (28), perch2_resource_log (2464), perch2_resource_tags (0), perch2_resources (590), perch2_resources_to_tags (0), perch2_scheduled_tasks (11), perch2_settings (30), perch2_user_passwords (0), perch2_user_privileges (34), perch2_user_role_privileges (15), perch2_user_roles (2), perch2_users (3)
Users: 3
App runtimes:
<?php
    $apps_list = array(
        'content',
        'perch_mailchimp',
        'perch_forms'
    );
Scheduled tasks for perch_mailchimp: import_data (1 mins)
Editor plug-ins: markitup
H1: bd3f1cad825b15293be5bc5e2bf1e709
L1: e16af107203ee3e3953ed7ef1b72afbd
F1: 2edba60ed1f613d6dd804feb202456a2
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 1
content_collapseList: 1
lang: en-gb
update_2.5.2: done
latest_version: 2.8.15
on_sale_version: 2.8.29
headerScheme: light
dashboard: 1
hide_pwd_reset: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 1
logoPath: /perch/resources/logo.png
update_2.5.4: done
perch_mailchimp_secret: 8bf01e8cd00f5dce360627e9a1fed7fa
perch_mailchimp_update: 2.0
perch_mailchimp_api_key: 08aad00e56d0fb8e3a519edf32093333-us8
perch_mailchimp_list_id: 2d4e78a112
perch_mailchimp_campaign_url: /mailchimp/uutiskirjeet.php?s={campaignSlug}
update_2.6: done
update_2.6.3: done
update_2.6.6: done
update_2.7.3: done
update_2.8.13: done
update_2.8.17: done
update_2.8.29: done
Karri Karttunen

Karri Karttunen 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

What happens if you visit the Lists section of the MailChimp app?

It's empty.

I can see only Campaigns, all the other sections are empty.

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you turn on debug, do you see anything at the bottom of that page?

It seems that all of them has some errors:

Lists:


Debug Message [1] SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='03191ee11df7720e29f217896471d1a6' LIMIT 1 UPDATE perch2_users SET userHash='9ff6f9c7fe93e9a4addc7d9dd708d422' WHERE userID='1' [34] SELECT p.privKey FROM perch2_user_privileges p [29] SELECT * FROM (SELECT DISTINCT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID, settingValue, userID [nil] SELECT SQL_CALC_FOUND_ROWS DISTINCT * FROM perch2_mailchimp_lists ORDER BY listTitle ASC LIMIT 0, 20 [0] SELECT FOUND_ROWS() AS `count` Attempting app installation: perch_mailchimp [1] SHOW TABLES LIKE "perch2_mailchimp_lists" [0] SELECT COUNT(*) FROM perch2_mailchimp_lists WHERE listMailChimpID='2d4e78a112' Importing list: 2d4e78a112 INSERT INTO perch2_mailchimp_lists(listMailChimpID,listTitle,listMemberCount,listMemberCountSinceLastSend,listUnsubsSinceLastSend,listOpenRate,listClickRate,listLastSend,listCreated) VALUES('2d4e78a112','Industrial Trading Helsinki Oy - Uutiskirje',1306,0,5,19,244105409154,7,3868149324861,'2015-09-03 12:57:46','2014-08-15 12:34:03') Invalid query: SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1 [0] SELECT COUNT(*) FROM perch2_mailchimp_lists WHERE listMailChimpID='8515b5732c' Importing list: 8515b5732c INSERT INTO perch2_mailchimp_lists(listMailChimpID,listTitle,listMemberCount,listMemberCountSinceLastSend,listUnsubsSinceLastSend,listOpenRate,listClickRate,listLastSend,listCreated) VALUES('8515b5732c','Testilista',3,0,0,83,333333333333,41,666666666667,NULL,'2014-10-29 12:20:55') Invalid query: SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1 [nil] SELECT * FROM perch2_mailchimp_lists ORDER BY listTitle ASC adding: Here are your MailChimp lists. adding: Sync Queries: 11 Memory: 2,8365

Subscribers:


Debug Message [1] SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='784f22545c5581a556ffe3995db95a98' LIMIT 1 UPDATE perch2_users SET userHash='fc0bc860cba5ff100b44c42f9d1f52a1' WHERE userID='1' [34] SELECT p.privKey FROM perch2_user_privileges p [29] SELECT * FROM (SELECT DISTINCT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID, settingValue, userID [nil] SELECT * FROM perch2_mailchimp_lists ORDER BY listTitle ASC [1] SELECT * FROM perch2_mailchimp_imports WHERE 1=1 AND importType='subscribers' ORDER BY importUpdated ASC LIMIT 1 [nil] SELECT SQL_CALC_FOUND_ROWS DISTINCT s1.* FROM perch2_mailchimp_subscribers s1 JOIN perch2_mailchimp_subscriptions s2 ON s1.subscriberID=s2.subscriberID AND s2.subStatus='subscribed' ORDER BY subscriberCreated ASC LIMIT 0, 20 [0] SELECT FOUND_ROWS() AS `count` [nil] SELECT SQL_CALC_FOUND_ROWS DISTINCT s1.* FROM perch2_mailchimp_subscribers s1 JOIN perch2_mailchimp_subscriptions s2 ON s1.subscriberID=s2.subscriberID AND s2.subStatus='subscribed' ORDER BY subscriberCreated ASC LIMIT 0, 20 [0] SELECT FOUND_ROWS() AS `count` adding: List subscribers adding: Sync Queries: 11 Memory: 2,774 Array ( [type] => 2 [message] => Invalid argument supplied for foreach() [file] => /data/www/www.ith.fi/perch/addons/apps/perch_mailchimp/modes/subscribers.pre.php [line] => 36 )

Campaigns:


Debug Message [1] SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='1d03a08ad743a2d003276af2075eab14' LIMIT 1 UPDATE perch2_users SET userHash='15d03628cdc22178d0bbe6cc4d10cc20' WHERE userID='1' [34] SELECT p.privKey FROM perch2_user_privileges p [29] SELECT * FROM (SELECT DISTINCT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID, settingValue, userID [1] SELECT * FROM perch2_mailchimp_imports WHERE 1=1 AND importType='campaigns' ORDER BY importUpdated ASC LIMIT 1 [14] SELECT SQL_CALC_FOUND_ROWS DISTINCT * FROM perch2_mailchimp_campaigns ORDER BY campaignCreated DESC LIMIT 0, 20 [14] SELECT FOUND_ROWS() AS `count` adding: List campaigns adding: Sync [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 Looking up missing property listTitle [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 SELECT listTitle FROM perch2_mailchimp_campaigns WHERE campaignID='14' [0] Invalid query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'listTitle' in 'field list' [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 Looking up missing property listTitle [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 SELECT listTitle FROM perch2_mailchimp_campaigns WHERE campaignID='13' [0] Invalid query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'listTitle' in 'field list' [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 Looking up missing property listTitle [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 SELECT listTitle FROM perch2_mailchimp_campaigns WHERE campaignID='12' [0] Invalid query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'listTitle' in 'field list' [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 Looking up missing property listTitle [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 SELECT listTitle FROM perch2_mailchimp_campaigns WHERE campaignID='11' [0] Invalid query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'listTitle' in 'field list' [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 Looking up missing property listTitle [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 SELECT listTitle FROM perch2_mailchimp_campaigns WHERE campaignID='10' [0] Invalid query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'listTitle' in 'field list' [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 Looking up missing property listTitle [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 SELECT listTitle FROM perch2_mailchimp_campaigns WHERE campaignID='9' [0] Invalid query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'listTitle' in 'field list' [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 Looking up missing property listTitle [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 SELECT listTitle FROM perch2_mailchimp_campaigns WHERE campaignID='8' [0] Invalid query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'listTitle' in 'field list' [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 Looking up missing property listTitle [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 SELECT listTitle FROM perch2_mailchimp_campaigns WHERE campaignID='7' [0] Invalid query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'listTitle' in 'field list' [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 Looking up missing property listTitle [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 SELECT listTitle FROM perch2_mailchimp_campaigns WHERE campaignID='6' [0] Invalid query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'listTitle' in 'field list' [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 Looking up missing property listTitle [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 SELECT listTitle FROM perch2_mailchimp_campaigns WHERE campaignID='5' [0] Invalid query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'listTitle' in 'field list' [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 Looking up missing property listTitle [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 SELECT listTitle FROM perch2_mailchimp_campaigns WHERE campaignID='4' [0] Invalid query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'listTitle' in 'field list' [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 Looking up missing property listTitle [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 SELECT listTitle FROM perch2_mailchimp_campaigns WHERE campaignID='3' [0] Invalid query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'listTitle' in 'field list' [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 Looking up missing property listTitle [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 SELECT listTitle FROM perch2_mailchimp_campaigns WHERE campaignID='2' [0] Invalid query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'listTitle' in 'field list' [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 Looking up missing property listTitle [1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1 SELECT listTitle FROM perch2_mailchimp_campaigns WHERE campaignID='1' [0] Invalid query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'listTitle' in 'field list' Queries: 36 Memory: 3,1011

Webhooks:


Debug Message [1] SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='c61e0f1b7ef658f10217cd073e13e99d' LIMIT 1 UPDATE perch2_users SET userHash='a85a92fff43a5a94fc64ec5554a2d329' WHERE userID='1' [34] SELECT p.privKey FROM perch2_user_privileges p [29] SELECT * FROM (SELECT DISTINCT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID, settingValue, userID [nil] SELECT * FROM perch2_mailchimp_lists ORDER BY listTitle ASC [1] SELECT * FROM perch2_mailchimp_imports WHERE 1=1 AND importType='webhooks' ORDER BY importUpdated ASC LIMIT 1 [nil] SELECT SQL_CALC_FOUND_ROWS DISTINCT * FROM perch2_mailchimp_webhooks ORDER BY webhookID ASC LIMIT 0, 20 [0] SELECT FOUND_ROWS() AS `count` [nil] SELECT SQL_CALC_FOUND_ROWS DISTINCT * FROM perch2_mailchimp_webhooks ORDER BY webhookID ASC LIMIT 0, 20 [0] SELECT FOUND_ROWS() AS `count` adding: List webhooks adding: Sync Queries: 11 Memory: 2,7412 Array ( [type] => 2 [message] => Invalid argument supplied for foreach() [file] => /data/www/www.ith.fi/perch/addons/apps/perch_mailchimp/modes/webhooks.pre.php [line] => 33 )
Drew McLellan

Drew McLellan 2638 points
Perch Support

When you deleted the tables, did you remove all the perch2_mailchimp tables?

Yeah, I did. There was I think four. But yes, I dropped all of them that had the extension _mailchimp.

Should I remove them again and start over?

Drew McLellan

Drew McLellan 2638 points
Perch Support

It's worth giving it a shot, as it looks like you still have old table definitions.

Well, that didn't help.

Once I dropped these tables:

perch2_mailchimp_campaigns perch2_mailchimp_imports perch2_mailchimp_lists perch2_mailchimp_subscribers perch2_mailchimp_subscriptions perch2_mailchimp_webhooks

On first login Perch generated them again and the campaigns are already in the list.

Drew McLellan

Drew McLellan 2638 points
Perch Support

I don't follow how the campaigns could exist without the lists.

Me neither.

I emptied all the tables from the database, then dropped the tables again.

After that only the campaigns reappeared, so it definitely gets them from mailchimp API.

Apache Error log has this kinda line:

[Wed May 18 13:02:19.997758 2016] [:error] [pid 17462] [client xx.xx.67.57:37961] PHP Warning:  Invalid argument supplied for foreach() in /data/www/www.ith.fi/perch/addons/apps/perch_mailchimp/modes/subscribers.pre.php on line 36, referer: http$

Lists has this error:

Invalid query: SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1

Subsrcibers this:

Array
(
    [type] => 2
    [message] => Invalid argument supplied for foreach()
    [file] => /data/www/www.ith.fi/perch/addons/apps/perch_mailchimp/modes/subscribers.pre.php
    [line] => 36
)

Campaigns has this:

Looking up missing property listTitle
[1] SELECT * FROM perch2_mailchimp_lists WHERE listID=0 LIMIT 1
SELECT listTitle FROM perch2_mailchimp_campaigns WHERE campaignID='3'
[0] Invalid query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'listTitle' in 'field list'

And webhooks:

Array
(
    [type] => 2
    [message] => Invalid argument supplied for foreach()
    [file] => /data/www/www.ith.fi/perch/addons/apps/perch_mailchimp/modes/webhooks.pre.php
    [line] => 33
)
Drew McLellan

Drew McLellan 2638 points
Perch Support

Do you see the listTitle column in the lists table?

Yes I do. It's > CHAR / 255

The only table populated is the perch2_mailchimp_campaigns, naturally cause that's the only place shown in the backend.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Do you have any errors from when the table is created?

Nope, can't find any mysql errors.

Drew McLellan

Drew McLellan 2638 points
Perch Support

When you get this error, what happens before it?

Invalid query: SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1

When I empty the and drop the tables. The tables gets recreated after login to Perch.

So here's all the errors when the API key is not set and logged in to Perch for the 'first' time.

In Apache error I get this mentioned error:

[Wed May 18 13:50:09.228136 2016] [:error] [pid 21443] [client xx.xx.67.57:39756] PHP Warning:  Invalid argument supplied for foreach() in /data/www/www.ith.fi/perch/addons/apps/perch_mailchimp/modes/subscribers.pre.php on line 36, referer: https://www.ith.fi/perch/addons/apps/perch_mailchimp/
[Wed May 18 13:50:12.550921 2016] [:error] [pid 21443] [client xx.xx.67.57:39756] PHP Warning:  Invalid argument supplied for foreach() in /data/www/www.ith.fi/perch/addons/apps/perch_mailchimp/modes/webhooks.pre.php on line 33, referer: https://www.ith.fi/perch/addons/apps/perch_mailchimp/campaigns/
[Wed May 18 13:50:23.773268 2016] [:error] [pid 21429] [client xx.xx.67.57:6606] PHP Warning:  Invalid argument supplied for foreach() in /data/www/www.ith.fi/perch/addons/apps/perch_mailchimp/modes/subscribers.pre.php on line 36, referer: https://www.ith.fi/perch/addons/apps/perch_mailchimp/~

Lists:

Debug Message
[1] SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='66bdc8cffeef7bdce6b92facab23fcb8' LIMIT 1
UPDATE perch2_users SET userHash='2015769992f0e6b64a64aa1b1aff6d26' WHERE userID='1'
[34] SELECT p.privKey FROM perch2_user_privileges p
[29] SELECT * FROM (SELECT DISTINCT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID, settingValue, userID
SELECT SQL_CALC_FOUND_ROWS DISTINCT * FROM perch2_mailchimp_lists ORDER BY listTitle ASC LIMIT 0, 20
Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ith.perch2_mailchimp_lists' doesn't exist
[29] SELECT FOUND_ROWS() AS `count`
adding: Here are your MailChimp lists.
adding: Sync
Queries: 6
Memory: 2,6691

Subscribers:


Debug Message [1] SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='7f24f950babd5546d432d1321a325a72' LIMIT 1 UPDATE perch2_users SET userHash='882326c4af8e2e99f26483c1e28692e9' WHERE userID='1' [34] SELECT p.privKey FROM perch2_user_privileges p [29] SELECT * FROM (SELECT DISTINCT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID, settingValue, userID SELECT * FROM perch2_mailchimp_lists ORDER BY listTitle ASC Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ith.perch2_mailchimp_lists' doesn't exist SELECT * FROM perch2_mailchimp_imports WHERE 1=1 AND importType='subscribers' ORDER BY importUpdated ASC LIMIT 1 Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ith.perch2_mailchimp_imports' doesn't exist SELECT SQL_CALC_FOUND_ROWS DISTINCT s1.* FROM perch2_mailchimp_subscribers s1 JOIN perch2_mailchimp_subscriptions s2 ON s1.subscriberID=s2.subscriberID AND s2.subStatus='subscribed' ORDER BY subscriberCreated ASC LIMIT 0, 20 Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ith.perch2_mailchimp_subscribers' doesn't exist [29] SELECT FOUND_ROWS() AS `count` SELECT SQL_CALC_FOUND_ROWS DISTINCT s1.* FROM perch2_mailchimp_subscribers s1 JOIN perch2_mailchimp_subscriptions s2 ON s1.subscriberID=s2.subscriberID AND s2.subStatus='subscribed' ORDER BY subscriberCreated ASC LIMIT 0, 20 Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ith.perch2_mailchimp_subscribers' doesn't exist [1] SELECT FOUND_ROWS() AS `count` adding: List subscribers adding: Sync Queries: 7 Memory: 2,7824 Array ( [type] => 2 [message] => Invalid argument supplied for foreach() [file] => /data/www/www.ith.fi/perch/addons/apps/perch_mailchimp/modes/subscribers.pre.php [line] => 36 )

Campaigns:

Debug Message
[1] SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='7dade2f3b820f21d476a5ceb754d39aa' LIMIT 1
UPDATE perch2_users SET userHash='55099ce0aeac5954ccb9ca610309e588' WHERE userID='1'
[34] SELECT p.privKey FROM perch2_user_privileges p
[29] SELECT * FROM (SELECT DISTINCT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID, settingValue, userID
SELECT * FROM perch2_mailchimp_imports WHERE 1=1 AND importType='campaigns' ORDER BY importUpdated ASC LIMIT 1
Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ith.perch2_mailchimp_imports' doesn't exist
SELECT SQL_CALC_FOUND_ROWS DISTINCT * FROM perch2_mailchimp_campaigns ORDER BY campaignCreated DESC LIMIT 0, 20
Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ith.perch2_mailchimp_campaigns' doesn't exist
[29] SELECT FOUND_ROWS() AS `count`
INSERT INTO perch2_mailchimp_imports(importType,importSourceID,importCount,importOffset) VALUES('campaigns',NULL,20,0)
Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ith.perch2_mailchimp_imports' doesn't exist
SELECT SQL_CALC_FOUND_ROWS DISTINCT * FROM perch2_mailchimp_campaigns ORDER BY campaignCreated DESC LIMIT 0, 20
Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ith.perch2_mailchimp_campaigns' doesn't exist
[1] SELECT FOUND_ROWS() AS `count`
adding: List campaigns
adding: Sync
Queries: 7
Memory: 2,7383

Webhooks:


Debug Message [1] SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='e3246925475eb7c2158576aec8ca6457' LIMIT 1 UPDATE perch2_users SET userHash='5d84ce9af71fa205c6c49c01307af0ed' WHERE userID='1' [34] SELECT p.privKey FROM perch2_user_privileges p [29] SELECT * FROM (SELECT DISTINCT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID, settingValue, userID SELECT * FROM perch2_mailchimp_lists ORDER BY listTitle ASC Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ith.perch2_mailchimp_lists' doesn't exist SELECT * FROM perch2_mailchimp_imports WHERE 1=1 AND importType='webhooks' ORDER BY importUpdated ASC LIMIT 1 Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ith.perch2_mailchimp_imports' doesn't exist SELECT SQL_CALC_FOUND_ROWS DISTINCT * FROM perch2_mailchimp_webhooks ORDER BY webhookID ASC LIMIT 0, 20 Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ith.perch2_mailchimp_webhooks' doesn't exist [29] SELECT FOUND_ROWS() AS `count` SELECT SQL_CALC_FOUND_ROWS DISTINCT * FROM perch2_mailchimp_webhooks ORDER BY webhookID ASC LIMIT 0, 20 Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ith.perch2_mailchimp_webhooks' doesn't exist [1] SELECT FOUND_ROWS() AS `count` adding: List webhooks adding: Sync Queries: 7 Memory: 2,7574 Array ( [type] => 2 [message] => Invalid argument supplied for foreach() [file] => /data/www/www.ith.fi/perch/addons/apps/perch_mailchimp/modes/webhooks.pre.php [line] => 33 )
Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you saying if you unset the API key the tables don't get created? Does that help us in any way?

Nope, the tables get created in any case. They're all empty at first and on the first visit to campaigns page it gets the campaigns from mailchimp correctly.

The other lists, webhooks etc. are not fetched from mailchimp.

Drew McLellan

Drew McLellan 2638 points
Perch Support

This is really puzzling. Can you give me a dump of the structure of the mail chimp tables that you currently have?

Hi, Drew.

I sent you the entire database dump via. email. Did you see it?