-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5.2] Fix of unnecessary SQL query for Fields, get the field value already loaded by getFields() #42861
Conversation
I have tested this item ✅ successfully on 59bd3b7 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42861. |
I have tested this item ✅ successfully on 59bd3b7 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42861. |
I have tested this item ✅ successfully on 59bd3b7 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42861. |
shuldn't that go into 4.4? |
Good question. @Fedik Is the unnecessary query an issue in 4.4, too? |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42861. |
yeap, |
@Fedik Then a PR should be made for 4.4-dev. |
I will do another, later |
During PBF |
I've restored the previous human test results as the PR was closed but then reopened, and there was no change since the successful tests. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42861. |
I moved it to 5.2 as a decision from maintainer |
Thanks @Fedik ! |
Co-authored-by: Richard Fath <[email protected]> Co-authored-by: Benjamin Trenkle <[email protected]>
Summary of Changes
Remove unnecessary SQL query for the custom fields, during the form rendering.
FieldsHelper::getFields()
load the field value, howeverFieldsHelper::prepareForm()
also loading them wthout a reason.Also removed some dead code.
Testing Instructions
Enable debug and debug query.
Create a couple of Custom fields, let say 10.
Open article editing.
Actual result BEFORE applying this Pull Request
Notice amount of query in debug.
Let say 75
Expected result AFTER applying this Pull Request
The amount of query will be 10 less, 65
Link to documentations
Please select: