RTC bug PR-5.2-dev Pending

User tests: Successful: Unsuccessful:

avatar Fedik
Fedik
23 Feb 2024

Summary of Changes

Remove unnecessary SQL query for the custom fields, during the form rendering.
FieldsHelper::getFields() load the field value, however FieldsHelper::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:

  • Documentation link for docs.joomla.org:
  • No documentation changes for docs.joomla.org needed
  • Pull Request link for manual.joomla.org:
  • No documentation changes for manual.joomla.org needed
avatar Fedik Fedik - open - 23 Feb 2024
avatar Fedik Fedik - change - 23 Feb 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 Feb 2024
Category Administration com_fields
avatar Fedik Fedik - change - 23 Feb 2024
The description was changed
avatar Fedik Fedik - edited - 23 Feb 2024
avatar Fedik Fedik - change - 23 Feb 2024
The description was changed
avatar Fedik Fedik - edited - 23 Feb 2024
avatar crommie crommie - test_item - 24 Feb 2024 - Tested successfully
avatar crommie
crommie - comment - 24 Feb 2024

I have tested this item ✅ successfully on 59bd3b7

Before: 61 queries. After: 51 queries.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42861.

avatar chmst chmst - test_item - 24 Feb 2024 - Tested successfully
avatar chmst
chmst - comment - 24 Feb 2024

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.

avatar adj9 adj9 - test_item - 24 Feb 2024 - Tested successfully
avatar adj9
adj9 - comment - 24 Feb 2024

I have tested this item ✅ successfully on 59bd3b7

Its ok Queries have decreased


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42861.

avatar chmst
chmst - comment - 24 Feb 2024

shuldn't that go into 4.4?

avatar richard67
richard67 - comment - 24 Feb 2024

shuldn't that go into 4.4?

Good question. @Fedik Is the unnecessary query an issue in 4.4, too?

avatar richard67 richard67 - change - 24 Feb 2024
Status Pending Ready to Commit
Labels Added: bug PR-5.1-dev
avatar richard67
richard67 - comment - 24 Feb 2024

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42861.

avatar Fedik
Fedik - comment - 24 Feb 2024

Is the unnecessary query an issue in 4.4, too?

yeap,

avatar richard67
richard67 - comment - 24 Feb 2024

Is the unnecessary query an issue in 4.4, too?

yeap,

@Fedik Then a PR should be made for 4.4-dev.

avatar Fedik
Fedik - comment - 24 Feb 2024

I will do another, later

avatar gilou103
gilou103 - comment - 24 Feb 2024

During PBF
16 Content Article - Custom fields (my Group),
before patch 67 queries, after patch 51 queries

avatar Fedik Fedik - change - 25 Feb 2024
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2024-02-25 12:01:39
Closed_By Fedik
Labels Added: RTC
avatar Fedik
Fedik - comment - 25 Feb 2024

I moved to 4.4 branch:

avatar Fedik Fedik - close - 25 Feb 2024
avatar Fedik Fedik - change - 7 Mar 2024
Status Closed New
Closed_Date 2024-02-25 12:01:39
Closed_By Fedik
Labels Removed: RTC
avatar Fedik Fedik - change - 7 Mar 2024
Status New Pending
avatar Fedik Fedik - reopen - 7 Mar 2024
avatar richard67 richard67 - alter_testresult - 9 Mar 2024 - crommie: Tested successfully
avatar richard67 richard67 - alter_testresult - 9 Mar 2024 - chmst: Tested successfully
avatar richard67 richard67 - alter_testresult - 9 Mar 2024 - adj9: Tested successfully
avatar richard67
richard67 - comment - 9 Mar 2024

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.

avatar richard67 richard67 - change - 9 Mar 2024
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 9 Mar 2024

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42861.

avatar bembelimen bembelimen - change - 17 Mar 2024
Title
[5.1] Fix of unnecessary SQL query for Fields, get the field value already loaded by getFields()
[5.2] Fix of unnecessary SQL query for Fields, get the field value already loaded by getFields()
avatar bembelimen bembelimen - edited - 17 Mar 2024
avatar bembelimen
bembelimen - comment - 17 Mar 2024

I moved it to 5.2 as a decision from maintainer

avatar pe7er pe7er - change - 23 Apr 2024
Labels Added: RTC PR-5.2-dev
Removed: PR-5.1-dev
avatar pe7er pe7er - change - 30 Apr 2024
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2024-04-30 08:23:56
Closed_By pe7er
avatar pe7er pe7er - close - 30 Apr 2024
avatar pe7er pe7er - merge - 30 Apr 2024
avatar pe7er
pe7er - comment - 30 Apr 2024

Thanks @Fedik !

Add a Comment

Login with GitHub to post a comment