-
-
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
[4.4] Fix of unnecessary SQL query for Fields, get the field value already loaded by getFields() #42882
Conversation
Does this also work when you fetch two articles within the same request. Pretty sure the second article gets the same rawvalue as the first one. |
Nope joomla-cms/administrator/components/com_fields/src/Helper/FieldsHelper.php Lines 179 to 185 in d272577
Every time you call |
I have tested this item ✅ successfully on e5e307b This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42882. |
1 similar comment
I have tested this item ✅ successfully on e5e307b This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42882. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42882. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42882. |
Summary of Changes
The same as #42861 but for j4
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: