This is a reference to the old #14162, I closed it and I'm opening a new issue because I gained more knowledge since then, and the way it was described in that issue was too convoluted and unclear. So I'll have another go and explain it better.
I would expect the page to load super fast because there is no article data to load whatsoever.
The loading is VERY SLOW, taking dozens of seconds, if not minutes, depending on the amount of articles. Because Joomla is loading data from ALL those 432 articles as if they were all displayed at the same time in that one page with no pagination, despite the fact you're actually displaying 0!
Still happening as of Joomla 5
To top it off, obviously, if in the options you put to only display "1" article, of course it loads super fast because it only loads 1 article, correctly. You put "20" articles? It displays quite fast because it only loads 20 articles, correctly. You put "0" articles? It loads incredibly slow because it loads all 432 articles (and then it correctly shows 0 at the end of the loading). This can't be intended behavior.
In the old issue, someone suggested to put "-1" articles in the options to work around the problem, and that does indeed work and avoids Joomla loading data from all the articles. But you shouldn't be having to use a workaround, if you put 0 articles, and it shows 0 articles, it shouldn't load any article data either.
PS: You may ask, why would you want to input 0 articles in the first place? Well, it could be useful for cases when you might want to only display the description of the category, or if you want to display the category items via other means (content plugins or modules) and you don't want to display them natively. Plus, the use case shouldn't even matter, it's just a wrong/flawed behavior regardless. Also, this wasn't an issue back in the Joomla 1.5 days.
If #17893 was addressed, this is technically and logically even worse and should definitely be addressed.
Labels |
Added:
?
|
Category | ⇒ | com_content Feature Request |
Status | New | ⇒ | Discussion |
So you are saying that limit zero for DB model
but then
Since the category DB model already has special handling for blog layout as you are showing above
I think your fix suggestion is valid
If this is OK then I will make PR when I have more time.
That sounds like a good fix, simple and effective :)
The fix is not complete because there is a second query SELECT COUNT(*)...
, which still is executed.
Labels |
Added:
J3 Issue
|
Status | Discussion | ⇒ | Information Required |
Category | com_content Feature Request | ⇒ | com_content |
Yup still an issue
Status | Information Required | ⇒ | Confirmed |
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-03-09 20:38:23 |
Closed_By | ⇒ | rdeutz |
Closing this because it is expected behaviour.
To be a bit more specific: A value of 0 means no limit. A Category Blog Menu Item is for displaying articles of a category. If you want to show only the category description you can create a special view by copy the view to your template and remove the showing of articles.
@rdeutz Sorry but that's stupid. If 0 meant no limit, then entering 0 would show all articles. But it doesn't.
Instead, entering 0 shows 0 articles. While still loading all their data in the background as if it was showing all.
It should be either one way (show 0 articles, load 0 data), or the other (show & load all articles)
Currently it's inconsistent and a mess
For me it is a missuse of the Category Blog for something that it is not made for. But I am open to look at a PR so that we can check what the side effects are.
For me it is a missuse of the Category Blog for something that it is not made for.
Maybe, but then it should be made consistent when you enter the '0' value. Right now it's not even consistent, as explained in my previous post and opening post.
But I am open to look at a PR so that we can check what the side effects are.
Then maybe don't go around closing tickets on your own volition? :) Otherwise, a PR will never be made.
Like it or like it not, it's my job to make decisions on issues. PRs can be made without an issue, but seems it is not so important, even in 4 years we haven't seen a PR.
PRs can be made without an issue
Nobody will make a PR if there's no issue opened for it.
Nobody will make a PR if there's no issue opened for it.
Maybe, same as the last 4 years.
Nobody will ever see this again if this gets closed.
This is my last message about this issue if this gets closed, why should I care if you don't care about improving Joomla yourself.
Labels |
Removed:
J3 Issue
|
@joomdonation Why is this issue and PR closed? This is still an issue in Joomla 4 and 5...
Reopening as the pull request has been closed.
Status | Closed | ⇒ | New |
Closed_Date | 2021-03-09 20:38:23 | ⇒ | |
Closed_By | rdeutz | ⇒ | |
Labels |
Added:
No Code Attached Yet
Removed: ? |
Labels |
Added:
bug
|
Because
$limit = 0
usual means no limit there is hard to change it in J3.x.It can help only in the blog: