I am getting the error in the image below. It is not always generated by the same file (in this case ".../IOHelper.php").
I can't quite figure out what is causing this, Can anyone provide some insight into what can cause this error specifically (I understand there is a memory issue) and maybe point to where I could be looking as far as a culprit.
My hunch is it could be due to this relational query being done on users (team is what it is called here).
{% set relatedDepartment = craft.entries.section('departments').relatedTo({
sourceElement: teamEntry,
field: 'departmentLabel'
}) %}
My understanding is this is set up correctly and should only pull the department information related to that entry in the loop?
the whole block looks like this
{% for teamEntry in craft.entries.section('team').order('title').find() %}
{% set relatedDepartment = craft.entries.section('departments').relatedTo({
sourceElement: teamEntry,
field: 'departmentLabel'
}) %}
<div class="photo team-photo col-xs-6 col-sm-4 col-md-3 col-lg-2 team-photo-{% for department in teamEntry.departmentLabel %}{{ department.id }}{% endfor %} all" data-department-id="{% for department in teamEntry.departmentLabel %}{{ department.id }}{% endfor %}" data-border-color="{% for department in relatedDepartment %}{{ department.departmentColor }}{%endfor%}">
{% set mad = teamEntry.imgMad.first() %}
{% set disgusted = teamEntry.imgDisgusted.first() %}
{% set sad = teamEntry.imgSad.first() %}
{% set neutral = teamEntry.imgNeutral.first() %}
{% set content = teamEntry.imgContent.first() %}
{% set happy = teamEntry.imgHappy.first() %}
{% if neutral | length>0 %}
<img src="{{ neutral.url }}" class="image mood team-{% for department in teamEntry.departmentLabel %}{{ department.id }}{% endfor %}"/>
{% else %}
<img src="/img/nophoto.png" class="team-{% for department in teamEntry.departmentLabel %}{{ department.id }}{% endfor %} image" alt="no photo for {{ teamEntry.title }}"/>
{% endif %}
<div class="names">{{ teamEntry.title }}<br><span>{% for department in teamEntry.departmentLabel %}{{ department.title }}{% endfor %}</span></div>
<div class="hovertext t3modal" href="#modalContent" data-slug-url="/people/detail?q={{ teamEntry.slug }}" data-slug="{{ teamEntry.slug }}" >
<div class="inhover">
<span class="title">View Profile</span>
</div>
</div>
</div>
{% endfor %}
