Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello All,
My code that sends periodic emails through Mailchimp using this module died last week. I've been trying to troubleshoot this today.
This line;
$campaign_id = mailchimp_campaign_save_campaign($template_content, $options);
Creates PDO Exceptions via the entity_modified module because the entity_id used is not an integer;
PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: 'ffabd27f3c' for column 'entity_id' at row 1: INSERT INTO {entity_modified} (entity_type, entity_id, modified) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array
(
[:db_insert_placeholder_0] => mailchimp_campaign
[:db_insert_placeholder_1] => ffabd27f3c
[:db_insert_placeholder_2] => 1449468150
)
As you can see, 'ffabd27f3c' is not a valid entity_id as it contains both alphanumeric chars.
Now, I've gotten around this for the time being by changing the entity_id col to a varchar(20) (from int(10)) but thats an ugly 'fix'.
Any ideas?
Thanks,
Christian
Comment | File | Size | Author |
---|---|---|---|
#11 | interdiff-2630034-9-11.txt | 2.05 KB | efpapado |
#11 | non_int_entity_id-2630034-11.patch | 12.5 KB | efpapado |
#9 | mailchimp-fix_campaign_non_int_id-2630034-9.patch | 10.72 KB | brunodbo |
#5 | mailchimp-fix_campaign_non_int_id-2630034-3.patch | 13.06 KB | mcrump |
#3 | campaign-support-entity-modified.patch | 610 bytes | mnlund |
|
Comments
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous at Ramsalt Lab commentedHi, I had the same problem. I wrote this patch for it. There are more issues having the entity id as string. The hash for the campaign id is still available though.
Comment #3
mnlund CreditAttribution: mnlund at Ramsalt Lab commentedHi,
I have created a new patch for this problem just adding the property modified property name to the entity info hook to support the Entity modified module.
Comment #4
ruscoe CreditAttribution: ruscoe at ThinkShout for Mailchimp commentedWe're going to be ending support for the 7.x-3.x branch due to the upcoming deprecation of the v2.0 MailChimp API. If you'd still like to make this change, please feel free to reopen for the 7.x-4.x branch (patch will also need to be rerolled.)
Comment #5
mcrump CreditAttribution: mcrump commentedHello all,
I have rerolled the original patch against 7.x-4.x-dev and reopened this issue. The latest version of the patch file is attached. Hope it helps.
Cheers,
Michael
Comment #6
ruscoe CreditAttribution: ruscoe at ThinkShout for Mailchimp commentedThanks for rerolling the patch! Unfortunately the patch is removing most of the parameters from the
mailchimp_campaign_list_templates()
function. I know of one site in production that's using those parameters and there are probably more out there.Could you update the patch so doesn't remove those parameters?
Comment #7
johndubo CreditAttribution: johndubo commentedmcrump and ruscoe,
Just curious if there is any update on this. I'm having the exact same problem, but I need to keep Entity Modified b/c it is required by DFP module. Thanks for all the work on this!
Comment #8
johndubo CreditAttribution: johndubo commentedmnlund's campaign-support-entity-modified.patch in comment #3 worked for me in 7.x-4.8
Any reason why this might cause problems?
Thanks.
Comment #9
brunodboAlso running into this because of a contrib module's dependency on entity_modified.
Attached patch is a variation on #6:
- I removed the changes to
mailchimp_campaign_list_templates()
: could be I'm missing something, but they seem to be related to a different issue?- A added the newly added entity id to the
entity_create
call inmailchimp_campaign_save_campaign()
- without it, updating an existing campaign entity causes an integrity constraint violation error.Comment #10
brunodboComment #11
efpapado CreditAttribution: efpapado at Ramsalt Lab commentedAttaching an enhancement of patch #11, to be compatible with the (already committed) patch of this issue: https://www.drupal.org/node/2836141
Comment #12
ytsurkThis issue still remains in D8.
fe. when using the entity reference field, the entity_usage table is not compatible .. and a WSOD is happening ..
Comment #13
ytsurk