-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Articles count in "List all categories" #5416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b678307
Articles count in "List all categories"
smz d9e2c0b
For Travis...
smz f432d36
Fixed instance hashing
smz 010fbcd
Stupid mistake
smz 0f57ab4
Added clarifying comment
smz a3fcd40
Made this the default behaviour
smz 352ca75
Add test dependencies
wilsonge dd69bb2
Merge pull request #2 from wilsonge/patch-19
smz bfdced4
Update JCategoriesTest.php
smz e8a544a
Use $db->quote('*') instead of '*'
smz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one makes third party extensions fail on multilang sites, which don't want this part activated. The whole option of "currentlang" has no business here. It counters "countItems". The first part of this if needs to be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please make an example?
That condition is essential for returning the correct items in multilingual environments: you want to get items that are flagged for either the current language or
*There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before your change, you were able to disable the whole counting stuff. Your change forces this to be enabled when you are in a multi-language site, regardless of the component even using any language stuff at all. With your change, I can't switch this off.
I have a component that uses the category system, but does not have a catid field in the data table. So, since I don't need the whole counting thing and it is also not applicable to my situation, I disabled it for my JCategories implementation. This change forces this option to ON and since I don't have a DB table field for the category ID, I get a nice big error page with a broken query.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would you solve the original issue this PR has solved without breaking your component?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is already a PR #7303 by Hannes. I think it should fix both the original issue from here and the regression introduced.