diff --git a/EventListener/ApiSubscriber.php b/EventListener/ApiSubscriber.php index ab092b4e5..8876502ae 100644 --- a/EventListener/ApiSubscriber.php +++ b/EventListener/ApiSubscriber.php @@ -120,7 +120,7 @@ private function getCustomObjectsFromContactCreateRequest(array $entityRequestPa throw new InvalidArgumentException('Custom Object Plugin is disabled'); } - if (1 !== preg_match('~^'.preg_quote(LeadApiController::class, '~').'::(new|edit)(Entity|Entities)Action$~i', $request->attributes->get('_controller'))) { + if (1 !== preg_match('~^'.preg_quote(LeadApiController::class, '~').'(::|:)(new|edit)(Entity|Entities)Action$~i', $request->attributes->get('_controller'))) { throw new InvalidArgumentException('Not a API request we care about'); } diff --git a/EventListener/SegmentFiltersMergeSubscriber.php b/EventListener/SegmentFiltersMergeSubscriber.php index e1713a169..9c88e62fe 100644 --- a/EventListener/SegmentFiltersMergeSubscriber.php +++ b/EventListener/SegmentFiltersMergeSubscriber.php @@ -29,8 +29,7 @@ public static function getSubscribedEvents(): array * When \Mautic\LeadBundle\LeadEvents::LIST_FILTERS_MERGE is available in mautic\mautic, * we can use it here instead of string. */ - // \Mautic\LeadBundle\LeadEvents::LIST_FILTERS_MERGE => 'mergeCustomObjectFilters' - 'mautic.list_filters_merge' => 'mergeCustomObjectFilters', + \Mautic\LeadBundle\LeadEvents::LIST_FILTERS_MERGE => 'mergeCustomObjectFilters' ]; } diff --git a/Helper/QueryFilterHelper.php b/Helper/QueryFilterHelper.php index 8aaccc2ac..9e8925d77 100644 --- a/Helper/QueryFilterHelper.php +++ b/Helper/QueryFilterHelper.php @@ -367,7 +367,7 @@ public function createMergeFilterQuery( $segmentFilterFieldType = $filter['type'] ?: $this->queryFilterFactory ->getCustomFieldTypeById($segmentFilterFieldId); $dataTable = $this->queryFilterFactory->getTableNameFromType($segmentFilterFieldType); - $segmentMergedFilter = $filter['filter']; + $segmentMergedFilter = $segmentFilter; $segmentFilterFieldOperator = (string) $filter['operator']; $alias = $customItemXrefContactAlias.'_'.$segmentFilterFieldId.'_'.$filter['type']; diff --git a/Tests/Functional/Token/EmailTokenTest.php b/Tests/Functional/Token/EmailTokenTest.php index 0ef8f58ff..45f317282 100644 --- a/Tests/Functional/Token/EmailTokenTest.php +++ b/Tests/Functional/Token/EmailTokenTest.php @@ -173,7 +173,7 @@ public function testEmailTokens(): void Datetime: 2020-07-22 14:55:00, 2020-07-23 14:55:00 Email: product@a.email, product@b.email Hidden: hidden secret, top secret - Number: 0, 123, 456 + Number: 123, 456 Phone: +420555666777, +420555666888 Select: Option A, Option B Multiselect: "Option A","Option B", "Option B" @@ -188,7 +188,7 @@ public function testEmailTokens(): void Datetime:
  1. 2020-07-22 14:55:00
  2. 2020-07-23 14:55:00
Email: Hidden: - Number: 0,123 and 456 + Number: 123 and 456 Phone: +420555666777, +420555666888 Select:
  1. Option A
  2. Option B
Multiselect:
  1. "Option A","Option B"
  2. "Option B"
diff --git a/Tests/Functional/Token/EmailWithCustomObjectDynamicContentFunctionalTest.php b/Tests/Functional/Token/EmailWithCustomObjectDynamicContentFunctionalTest.php index 14bab135c..1d9cb0f16 100644 --- a/Tests/Functional/Token/EmailWithCustomObjectDynamicContentFunctionalTest.php +++ b/Tests/Functional/Token/EmailWithCustomObjectDynamicContentFunctionalTest.php @@ -155,7 +155,7 @@ public function testDynamicContentEmail(): void ], [ 'nexonempty@acquia.com', $this->buildDynamicContentArray([['nexon-text', '', 'empty']]), - 'Default Dynamic Content', + 'Custom Object Dynamic Content', ], [ 'nexonnotempty@acquia.com', $this->buildDynamicContentArray([['nexon-text', '', '!empty']]),