Skip to content

Instantly share code, notes, and snippets.

@heathdutton
Last active June 27, 2018 15:16
Show Gist options
  • Save heathdutton/27065426ff16f2b0834a550d8a27aa76 to your computer and use it in GitHub Desktop.
Save heathdutton/27065426ff16f2b0834a550d8a27aa76 to your computer and use it in GitHub Desktop.
Disable the Mautic contact list in campaign controller for faster page rendering.
diff --git a/app/bundles/CampaignBundle/Controller/CampaignController.php b/app/bundles/CampaignBundle/Controller/CampaignController.php
index 0e854506e..d03daf7d5 100644
--- a/app/bundles/CampaignBundle/Controller/CampaignController.php
+++ b/app/bundles/CampaignBundle/Controller/CampaignController.php
@@ -746,15 +746,18 @@ class CampaignController extends AbstractStandardFormController
'dateRangeForm' => $dateRangeForm->createView(),
'campaignSources' => $this->campaignSources,
'campaignEvents' => $events,
- 'campaignLeads' => $this->forward(
- 'MauticCampaignBundle:Campaign:contacts',
- [
- 'objectId' => $entity->getId(),
- 'page' => $this->get('session')->get('mautic.campaign.contact.page', 1),
- 'ignoreAjax' => true,
- ]
- )->getContent(),
+ // Temporary hack to overcome contact overflow on some campaigns.
+ 'campaignLeads' => 'Go <a href="/s/campaigns/view/'.$entity->getId().
+ '/contact/1" target="_blank">here</a> to see the contact list.',
+ // $this->forward(
+ // 'MauticCampaignBundle:Campaign:contacts',
+ // [
+ // 'objectId' => $entity->getId(),
+ // 'page' => $this->get('session')->get('mautic.campaign.contact.page', 1),
+ // 'ignoreAjax' => true,
+ // ]
+ // )->getContent(),
'tabDataMode' => $tabDataMode,
]
);
break;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment