Hi all - hope you’re surviving lockdown OK!
I have a site, which uses Migx to collate a bunch of people within different departments.
It works fine for me, but some users are getting an error on Mobile Safari saying:
“a problem repeatedly occurred on www.mysite.com”
The template on this page uses quite a few Migx calls to filter all the employees into categories. If I remove a few calls, it works fine - so I’m assuming the code is not efficient and causing the error.
This is how I’m calling them:
<h3 id="businessManagement">Business Management:</h3>
<ul class="teamList cards">
[[getImageList?
&tvname=`teamMembers`
&where=`{"team:=":"Management"}`
&tpl=`teamBioTpl`]]
</ul>
<h3 id="businessDevelopment">Business Development:</h3>
<ul class="teamList cards">
[[getImageList?
&tvname=`teamMembers`
&where=`{"team:=":"Business Development"}`
&tpl=`teamBioTpl`]]
</ul>
<h3 id="enforcement">Enforcement</h3>
<ul class="teamList cards">
[[getImageList?
&tvname=`teamMembers`
&where=`{"team:=":"Enforcement"}`
&tpl=`teamBioTpl`]]
</ul>
<h3 id="finance">Finance</h3>
<ul class="teamList cards">
[[getImageList?
&tvname=`teamMembers`
&where=`{"team:=":"Finance"}`
&tpl=`teamBioTpl`]]
</ul>
<h3 id="hr">Human Resources & Compliance</h3>
<ul class="teamList cards">
[[getImageList?
&tvname=`teamMembers`
&where=`{"team:=":"Human Resources and Compliance"}`
&tpl=`teamBioTpl`]]
</ul>
<h3 id="litigation">Litigation & Dispute Resolution</h3>
<ul class="teamList cards">
[[getImageList?
&tvname=`teamMembers`
&where=`{"team:=":"Litigation and Dispute Resolution"}`
&tpl=`teamBioTpl`]]
</ul>
<h3 id="nonContentious">Non-contentious</h3>
<ul class="teamList cards">
[[getImageList?
&tvname=`teamMembers`
&where=`{"team:=":"Non-contentious"}`
&tpl=`teamBioTpl`]]
</ul>
<h3 id="support">Support</h3>
<ul class="teamList cards">
[[getImageList?
&tvname=`teamMembers`
&where=`{"team:=":"Support"}`
&tpl=`teamBioTpl`]]
</ul>
and my tpl is this:
<li>
<img class="cardImage" src="[[+photo:pthumb=`w=300&h=420&zc=1`:default=`assets/images/team/defaultAvatar.png`]]" title="[[+firstName]] [[+lastName]]" alt="[[+firstName]] [[+lastName]]" />
<div>
<h4 style="margin-bottom:0;">[[+firstName]] [[+lastName]]</h4>
<p>[[+jobTitle]]</p>
<p class="bioTrigger">Read [[+firstName]]'s bio</p>
</div>
<div class="bio">
<img class="" src="[[+photo:pthumb=`w=300&h=420&zc=1`:default=`assets/images/team/defaultAvatar.png`]]" width="320" height="420" title="[[+firstName]] [[+lastName]]" alt="[[+firstName]] [[+lastName]]" />
<div>
<h4>[[+firstName]] [[+lastName]]</h4>
<p>[[+jobTitle]]</p>
<p><span class="hasIcon"><i class="fas fa-phone"></i> Call: [[+telephone:default=`[[++mainTel]]`]]</span>
[[+mob:notempty=` <span class="hasIcon"><i class="fas fa-mobile"></i> Mob: [[+mob]]</span>`]]
<span class="hasIcon"><i class="fas fa-envelope"></i> <a href="mailto:[[+email]]">Email [[+firstName]]</a></span></p>
[[+text]]
</div>
<span class="close">close</span>
</div>
</li>
Any ideas on how to make this more efficient/less memory intensive?
Would it be better to have multiple Migx TVs in the backend (one for each category), rather than one which is filtered on each call?
Thanks in advance!!
Andy