-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Having a multilang-site should not override the options of JCategories #7303
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
Conversation
|
Agree with the PR. That check doesn't make much sense there. |
|
@test - thank you! |
|
RTC |
|
Sorry but I am removing the RTC for now. This code was introduced in #5416 to fix an issue. Does the change proposed here break that again? Please provide a link to an extension that is effected by #5416 so that others can check This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7303. |
|
restarted travis checks |
|
@brianteeman every extension which wants to deactivate this counter ($options['countItems'] == 0) is affected, when the page is multilingual. |
|
Was my comment so hard to understand?
|
|
Is the code so complicated to read, @brianteeman ? |
|
@brianteeman Looking at the code, it should not break the original issue. But feel free to validate. |
|
Strongly disagree with this PR: content flagged for the |
|
Perhaps the best idea is to revert #5416 and implement it correctly? |
|
@smz That check shouldn't have anything to do with that. |
|
The problem with current code is that the counting is done when either multilanguage is enabled OR "countItems" is enabled. Which obviously is wrong. |
|
@Bakual: I'll have to check, but according to my memories it had... |
|
@smz then the bug is somewhere else, but THAT line is definitely wrong. |
|
Before this get's dirty, breath deeply before posting comments, keeps the blood pressure lower. |
|
@smz Just tested the original issue. Having a subcategory with 2 german, one english and one "all" article shows with a count of 2 (1 english + 1 all) when in english language. Looks correct. |
|
@Bakual |
|
Same behaviour with or without patch. Actually it's a unpexpected behaviour as it shows the german subcategory in my english page. But that's unrelated to this PR. |
|
without your component to test I can not test as you wont provide it then I wont test This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7303. |
It wouldn't do that without this PR... |
that error is there with and without this PR. So it's unrelated. |
|
OK: time for real testing from my part. Will do. Of course I cannot test the issue this solves as we don't have access to the affected component. Only regressions will be tested. One more consideration: in https://github.com/joomla/joomla-cms/pull/5416/files#r33668622 @Hackwar describes the issue at hand as:
I wondering (not affirming the contrary) if this is a correct implementation. |
It doesn't really matter. The counting (which needs to join over the content table) should only be performed when needed. Currently it's also done when multilanguage is enabled. Which makes no sense at all. |
|
I'm sure there was a reason for that: will come back later when I'll have finished my regressions testing. |
|
@smz since I wrote the code and implemented this option for exactly such a situation: Yes, it is a correct implementation |
|
hmmm... after testing I have to agree that apparently there is no regression. I still object on how this PR has been proposed, without any indication of what should have been tested: correct information should have called for testing with a "List All Categories" menu item, in a multilingual environment, with several categories flagged for specific languages and the "All" language, a mix of articles (again, flagged for specific languages and the "All" language), assigned to different categories also in unusual ways (i.e. languages flagged as "All" in specific languages categories and the inverse too). Of course a real test of the solved issue can be performed only by the few fortunate who have access to the affected component (I'm assuming @bembelimen and @chmst had such access) @Bakual
Edit: Oh yes, and testing instruction should have called for the "# Articles in Category" option to be turned off for real testing, of course! |
|
@smz yes, it's a commercial one |
|
@bembelimen did you test this PR, just to make sure we have someone to blame if it goes south ;-) |
|
@smz as if big testing instructions in this project make a difference. I've written PRs with pages of instructions on how to test and short instructions on how to test and most of them waited month and years to be processed, while other PRs without any testing instructions and without any testing at all, have been merged in a matter of half an hour. And more than once failed miserably afterwards. |
|
@rdeutz I tested the patch for the issues @Hackwar described:
|
|
Tested with success. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7303. |
|
P.S.: From my point of view this PR solves a fatal error and so should be 1. merged ASAP, and 2. result in a hotfix (i.e. a 3.4.3). This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7303. |
|
@smz - yes, I have access |
|
FYI: |
|
I want to express my deepest and most sincere apologies to all those who were affected by this issue that I introduced in #5416 😞 Furthermore, I want apology for having being initially stubborn about that piece of code being necessary: I should had checked before talking. I really don't know what I had in my mind when I coded that line... Murphy should had been standing at my shoulders 😈, or maybe I was just too 😴 for coding... |
|
@smz Well, looking at your profile picture, I think you maybe just were diving too deep into it, so maybe you just had forgotten to use an oxigen bottle ;-) This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7303. |
|
😄 BTW, nice to see you around, Richard! |
/start smart ass offtopic comment |
|
Oh yeah! Never at more than 6m on oxygen! 😜 |
|
@Bakual This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7303. |
|
@smz No need to apologise. This can happen to everyone of us. However, it shows that our reliance on 2 tests to merge something, is not enough and we need a code review for every PR. |
|
We usually review things before merge. But even reviewing can fail. Especially if you're not familiar with the code in question. So in the end, there is always a small risk in introducing bad code. |
|
Thanks for your words, Hannes: they are encouraging...
Yes, I agree with that, and since sometime I'm thinking about proposing the formation of a "Test Squad" and/or "Code Review Squad"... Another (probably not very much shared) opinion I have, is that we should merge PRs as soon as possible and issue patch releases very frequently (once a week or once a fortnight...). At the same time we could modify the Joomla Update component with an option to ignore such patch releases (maybe even by default) Minor releases too should be more frequent: even if not significant new features have been released, when a significant corpus of fixes have been collected (say once every three months, or something like that), they could be incorporated in a minor release. With the above scheduling 3rd party developers would be more motivated at checking eventual regressions with their extensions. And of course RC |
|
At the end of the day - that is why beta and RC releases are made so that On 2 July 2015 at 16:52, Thomas Hunziker [email protected] wrote:
Brian Teeman |
|
RC was about a week or even more. Still, regressions are only found after release. I don't think making more RCs or longer changes that. |
|
To "speak with straight tongue", what will change things is if 3rd party would actually test RCs with more stringent tests (which will require quite more than a week IMHO), but we can't point guns at nobody's head... So, releasing patch versions more frequently will help at least at not having a lot of people (different 3rd parties and their customers) angry for different reasons (different fuck-ups) at the same time... |
I think we all agree with more frequently releasing :) |
|
I got "1054 Unknown column 'i.language' in 'on clause'" for hwd Mediashare in Joomla 373. I checked lines in categories.php. Same of patch. I didn't understand. |
|
Looks like your database is faulty. If you think there is a bug, please open a new issue. If you need help, go to the Joomla forum. But you wont get much help in a closed pull request. |
With the changes in #5416, the option to disable the count-join in JCategories is permanently enabled, making extensions that don't use this feature and for example don't have a catid field in their table, fail. Just because you have a multilang-site, the option to disable the counting should NOT be overriden.