? ? Pending

User tests: Successful: Unsuccessful:

avatar SharkyKZ
SharkyKZ
10 Jun 2020

Pull Request for Issue # .

Summary of Changes

Fixes duplicate queries in Content - Contact plugin when author has no contacts assigned.

Testing Instructions

Create some articles
Go to com_content configuration.
Enable Link to Author's Contact Page option.
View article list/blog in frontend.

Expected result

No (or some, based on how many authors) duplicate queries in plugins\content\contact\contact.php.

Actual result

Many duplicates of this:

SELECT `contact`.`id` AS `contactid`,`contact`.`alias`,`contact`.`catid`,`contact`.`webpage`,`contact`.`email_to`
FROM `a400_contact_details` AS `contact`
WHERE `contact`.`published` = 1 AND `contact`.`user_id` = :createdby
ORDER BY `contact`.`id` DESC LIMIT 1

Documentation Changes Required

No.

avatar SharkyKZ SharkyKZ - open - 10 Jun 2020
avatar SharkyKZ SharkyKZ - change - 10 Jun 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 10 Jun 2020
Category Front End Plugins
avatar ceford ceford - test_item - 11 Jun 2020 - Tested successfully
avatar ceford
ceford - comment - 11 Jun 2020

I have tested this item successfully on 7ee0bea

Without the patch:

58 statements were executed, 22 of which were duplicates, 36 unique
4 copies of example.

With the patch:
55 statements were executed, 18 of which were duplicates, 37 unique
Example is unique.


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

avatar richard67 richard67 - test_item - 11 Jun 2020 - Tested successfully
avatar richard67
richard67 - comment - 11 Jun 2020

I have tested this item successfully on 7ee0bea

Scenario: One user only exists who is author of all articles. Option to link to his contact in articles is enabled, but there is no contact.
Without Patch: As many queries "SELECT contact.id AS contactid ..." as there are articles on the current page (in test: featured articles).
With patch: Only one.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29555.
avatar richard67 richard67 - change - 11 Jun 2020
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 11 Jun 2020

RTC


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

avatar richard67 richard67 - change - 11 Jun 2020
Labels Added: ? ?
avatar Quy Quy - close - 11 Jun 2020
avatar Quy Quy - merge - 11 Jun 2020
avatar Quy Quy - change - 11 Jun 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-06-11 13:05:42
Closed_By Quy
Labels

Add a Comment

Login with GitHub to post a comment