This problem was found after upgrading from 3.3.3 to 3.3.6 - it is not the same as #4330
Regrettably it is not simple to reproduce as it occurs in the jDownloads series 3.2 component.
You can see some reports at
http://www.jdownloads.com/forum/index.php?topic=7400.0
jDownloads worked in Joomla 3.3.3 but not in Joomla! 3.3.4 onwards - I have also tried 3.3.7 dev version. It was same version of jDownloads in all cases
It manifests itself with the absence of the pagination
Using in relevant code section:
$total_downloads = $this->pagination->get('total');
echo "In downloads.php circa line 107 total downloads=".$total_downloads."
";
Using Joomla 3.3.3 - which is correct
In downloads circa line 107 total downloads=25
Using Joomla 3.3.6 - which has a problem
In downloads.php circa line 107 total downloads=3
Joomla 3.3.3 vs Joomla 3.3.6
jDownloads 3.2.12 in all cases - no changes
Apologies for difficulty in testing situation but we are trying to get new updated release of jDownloads component. It is holding up release of this major component, it is very urgent
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-10-07 13:17:47 |
Status | Closed | ⇒ | New |
JDownloads extends JModelList. getListQuery indeed returns a JDatabaseQuery object
I tried to reproduce the issue yesterday by installing JDownloads using the webinstaller and creating some downloads and pagination worked for me on Joomla 3.3.7-dev. So I was lost.
But today I saw that the webinstaller actually installs an outdated version of it (1.9.2.8 Beta).
So I can have a look later today again and see if I can figure out something.
@Bakual Hi the version of jDownloads I am using is jD3.2.12 Beta see:
http://www.jdownloads.com/index.php?option=com_jdownloads&Itemid=133&task=view.download&catid=43&cid=337
Ah bummer, found why it fails. If you look at the conditional there, you see that it not only checks if the query is a JDatabaseQuery, it also checks if it's a select (obviously) and if it has a group or having part.
In case of JDownloads it has a group by part and thus it uses the fallback code.
But this code then has the limit applied.
I have a fix locally which seems to work. Will create a PR later.
Status | New | ⇒ | Closed |
Closed_Date | 2014-10-07 13:17:47 | ⇒ | 2014-10-08 18:02:13 |
Thanks for your help guys. I have now online a new jDownloads 3.2.13 beta version which worked with the original Joomla 3.3.6 files. So the users must not wait on the official next Joomla version.
About the problem:
Sad to say but I had found out, that i had used a few 'group by' clauses which was not really required. So i have removed it and get now again the correct 'total results for the pagination. But for the future should be your fix very useful. Thanks.
Labels |
Added:
?
|
The original issue with pagination was introduced with my PR #3945 which allowd to set limit and offset using the query builder (
$query->limit
and$query->offset
). Due to a bug in the getListCount method, the offset was now applied to the query there which I fixed with PR #4330 (It didn't make sense to apply limit and offset in aselect count
anyway).That's all I can think of which could affect your component.