Allow Dynamic Entity Reference 1.x or 2.x

Created on 29 May 2018, over 6 years ago
Updated 31 January 2024, 12 months ago

Triggers created that are interfering with CI. Can't find where they are actually created and for what purpose...is this something the module did or some funky drupal behaviour that I can't find

I have these in my database dump
/*!50003 CREATE*/ /*!50017 DEFINER="s173059"@"%"*/ /*!50003 TRIGGER salesforce_mapped_object_der_insert BEFORE insert ON salesforce_mapped_object FOR EACH ROW SET NEW.drupal_entity__target_id_int = IF(NEW.drupal_entity__target_id REGEXP '^[0-9]+$', CAST(NEW.drupal_entity__target_id AS UNSIGNED), NULL) */;;

/*!50003 CREATE*/ /*!50017 DEFINER="s173059"@"%"*/ /*!50003 TRIGGER salesforce_mapped_object_der_update BEFORE update ON salesforce_mapped_object FOR EACH ROW SET NEW.drupal_entity__target_id_int = IF(NEW.drupal_entity__target_id REGEXP '^[0-9]+$', CAST(NEW.drupal_entity__target_id AS UNSIGNED), NULL) */;;

And I can't see where they are being defined, so that I can figure out if they can be deleted. They cause problems for all CI solutions, local, acquia, circleCI because of the DEFINER being different. It's bad practice to have these in a module, where can I find where they are but also how can I get rid of them without breaking anything else?

Cheers

🐛 Bug report
Status

Fixed

Version

4.0

Component

salesforce_mapping.module

Created by

🇬🇧United Kingdom michaelmallett

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇧🇬Bulgaria yivanov

    This issue is still not fixed, I just got this error on Acquia CI

    SQLSTATE[HY000]: General error: 1419 You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable): DROP TRIGGER IF EXISTS salesforce_mapped_object_der_update;

    Salesforce Mapping: 5.0.3
    Dynamic Entity reference: 4.0.0-alpha3

  • 🇦🇺Australia thomwilhelm Sydney

    @yivanov Been a while since I looked at this, but I believe the issue is that dynamic_entity_reference 2.x and 4.x use triggers, which isn't supported by Acquia when copying a database.

    This ticket was allowing the salesforce suite module to allow different versions of dynamic_entity_reference to be installed. I believe to fix your issue, you'll need to uninstall dynamic_entity_reference 4.x and install dynamic entity reference 3.x. This should mean your database doesn't have triggers anymore and can copy between environments without issue.

    Proceed with caution but from memory this is what we did to fix.

Production build 0.71.5 2024