-
Notifications
You must be signed in to change notification settings - Fork 130
Closed
Labels
Bug: AcceptedBug has been confirmed, is reproducible, and ready to work on.Bug has been confirmed, is reproducible, and ready to work on.
Description
Description of the problem
Member field within grid field cause excessive number of MySQL queries.
How To Reproduce
Steps to reproduce the behaviour:
- Create a fluid field called Page Sections
- Add some basic fields for content creation.
- Add a grid field and call it Team
- Add Member field inside the grid field for relationship
- Create a new entry but for the first test don't use the Team field
- View the number of queries, on my test I had approx. 114
queries
7. Go back and edit the page you just created and add Team field from within your fluid field "Page Sections"
8. Save and preview. Number of queries increased from 117 to 914
- Repeat the process by adding more members and previewing the page, each time the number of queries more than doubles. With 2 members queries increased to 1714, with 3 it increased to 2514.
pages/index snippet of the templates
- layouts/_html-wrapper
- pages/index (calls layouts/_html-wrapper), code provided below
`{exp:channel:entries channel='{ch}' disable='{ch_disable}' limit='1' require_entry='yes' status='open'}
{page_sections}
...
{page_sections:team}
{content}
{if content:field_row_count == 1}
{/if}
{content:associated_account}
{if '{content:associated_account:linkedin}' != ''}
{/if}
{if '{content:associated_account:email}' != ''}
{/if}
{if "{content:name_title}"}{content:name_title}{if:else}{content:associated_account:screen_name}{/if}
{content:associated_account:position}
{content:bio}
{/content:associated_account}
{if content:field_row_count == content:field_total_rows}
{/if}
{/content}
{/page_sections:team}
{/page_sections}
{!-- no results --}
{if no_results}
No content published
{/if}
{/exp:channel:entries}`
Screenshots / Videos / Template Code
Environment Details:
- EE 7.5.13
- Nginx 1.26.2
- PHP 8.2.26
- MySQL 10.11.13-MariaDB-0ubuntu0.24.04.1
- Ubuntu 24.04.2 LTS
Metadata
Metadata
Assignees
Labels
Bug: AcceptedBug has been confirmed, is reproducible, and ready to work on.Bug has been confirmed, is reproducible, and ready to work on.