I have an Entry called Groups (I'm wondering if this might be some sort of reserved word issue) and, with Twig, I can bring out the base fields of id and title with no issue but when I try to pull out the first user-defined field: entry.groupChair
, it sends a bunch of jibberish (looks like code). Snippet of Jibberish:
O:28:"craft\elements\db\EntryQuery":86:{s:8:"editable";b:0;s:9:"sectionId";N;s:6:"typeId";N;s:8:"authorId";N;s:13:"authorGroupId";N;s:8:"postDate";N;s:6:"before";N;s:5:"after";N;s:10:"expiryDate";N;s:17:"*defaultOrderBy";a:1:{s:16:"entries.postDate";i:3;}s:11:"elementType";s:20:"craft\elements\Entry";s:5:"query";N;s:8:"subQuery";N;s:12:"contentTable";s:12:"[...much more omitted]
I have tried clearing the layout and reloading it. I have permanently deleted the Groups entry and brought it back in with FeedMe. Still have the issue. Groups look and operate fine in the front end. I was concerned that maybe the variable wasn't defined and added a test for that, but with the jibberish, it's considered defined and it prints out on screen.
{% set myEntryQuery = craft.entries()
.section('groups')
.limit(40)
.order('title')
%}
{% set entries = myEntryQuery.all() %}
{% block content %}
<ul>
{% for entry in entries %}
<li>
<label>
Group:({{entry.Id}}) {{ entry.title}} <br>
{% if entry.groupChair is defined %}
Group Chair: {{ entry.groupChair}} |
{% endif %}
</label>
</li>
{% endfor %}
</ul>
{% endblock %}
groupChair
field?