PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar nordmograph
nordmograph
3 Nov 2025

The method loads the profile info for the linked user even when no user is linked ($contact->user_id == 0), loading unnecessary stuff (UserModel, form, data, plugin) for nothing.

Pull Request for Issue # .

Summary of Changes

Conditions the request of Contact Linked profile data and functions to the existence of a linked user

Testing Instructions

Create a contact item and test linking it or not to a user

Actual result BEFORE applying this Pull Request

  • Loads profile information from a id = 0 user to bind it to contact

Expected result AFTER applying this Pull Request

  • Doesn't load profile information to bind to contact
  • Still works for a contact item linked to existing user , loading profile data and binding to contact

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 nordmograph nordmograph - open - 3 Nov 2025
avatar nordmograph nordmograph - change - 3 Nov 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 3 Nov 2025
Category Front End com_contact
avatar richard67 richard67 - change - 3 Nov 2025
Title
Do not get the profile info for the linked user when no user is linked
[5.4] Do not get the profile info for the linked user when no user is linked
avatar richard67 richard67 - edited - 3 Nov 2025
avatar nordmograph nordmograph - change - 3 Nov 2025
Labels Added: PR-5.4-dev
avatar ceford
ceford - comment - 4 Nov 2025

I have a problem! I created a contact named Nobody and left all of the fields blank. It is in Category: Sample Data-Contact and is Featured. I see it in a list of featured contacts along with two others. Selecting the link throes a 404 page with this call stack:

 # 	Function 	Location
1 	() 	JROOT/libraries/src/Router/Router.php:166
2 	Joomla\CMS\Router\Router->parse() 	JROOT/libraries/src/Application/SiteApplication.php:767
3 	Joomla\CMS\Application\SiteApplication->route() 	JROOT/libraries/src/Application/SiteApplication.php:243
4 	Joomla\CMS\Application\SiteApplication->doExecute() 	JROOT/libraries/src/Application/CMSApplication.php:304
5 	Joomla\CMS\Application\CMSApplication->execute() 	JROOT/includes/app.php:58
6 	require_once() 	JROOT/index.php:51 

Comparing two links:

http://localhost/joomla-cms5/index.php/en/contact-component/contact-categories/park-site/webmaster
http://localhost/joomla-cms5/index.php/en/contact-component/contact-categories/nobody

Ah! Wrong parent category.

So with that fixed, the difference is ... what?

I see exactly the same result with and without the patch applied. And with and without a linked user.


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

avatar richard67
richard67 - comment - 4 Nov 2025

So with that fixed, the difference is ... what?

I see exactly the same result with and without the patch applied. And with and without a linked user.

@ceford As far as I understand this PR, there should not be a visible difference. Everything should work as well as before for the 2 cases (contact item without a linked user, and contact item with a linked user).

avatar ceford ceford - test_item - 7 Nov 2025 - Tested successfully
avatar ceford
ceford - comment - 7 Nov 2025

I have tested this item ✅ successfully on af75ef3


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

avatar muhme muhme - test_item - 7 Nov 2025 - Tested successfully
avatar muhme
muhme - comment - 7 Nov 2025

I have tested this item ✅ successfully on af75ef3

Tested with JBT

  • Created contact 'no user' without linked user in category 'Uncategorised'
  • Created menu item 'contacts' in 'Main Menu' with 'List Contacts in a Category 'Uncategorised'
  • Jome Dashboad > Global Configuration > Debug System > Yes
  • Site frontend > 'contacts' > 'no user' seen 38 database queries

Applied PR with Patch Teser

  • database queries reduced to 33

This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46398.
avatar muhme muhme - change - 7 Nov 2025
Status Pending Ready to Commit
avatar muhme
muhme - comment - 7 Nov 2025

RTC


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

Add a Comment

Login with GitHub to post a comment