Set up a few thousand contacts (we manually uploaded 34k contacts through the database, not the web interface).
Go to the page of the contacts, select a single contact
The single contact shows up.
The application hangs and times out.
Reproduced on two different machines. One Ubuntu 18.04 virtual machine with 8 GB memory, PHP memory of 2 GB, apache2, php 7.1. The other is Debian 10 with 8 GB memory, PHP memory of 2 GB, apache2 and php 7.3.
I traced this down to a for loop in htdocs/component/com_contact/model/category.php, function getItems(). When asking for a single item the model still fetches all items and loops through them causing the hang.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-02-25 13:02:49 |
Closed_By | ⇒ | zero-24 |
Hi @zero-24 , I saw it and checked in my local environment. Works fine but I am a little worried that this leaves the $contacts variable unset and it is used later on in the method. Like in line 287 then an if check is using the $contacts variable and in other places inside this method. Perhaps it would be proper to address this?
@olijens My comment #28077 (comment) should address your concern
However, with that PR, the issue will only be shorted if you choose to not Show Contact List. If you set that parameter to Yes, the original issue will still happens. Maybe we should limit number of contacts instead of loading all like how it's at the moment.
But at least the PR will solve your issue for now .
Hi @olijens please check and test: #28077