Skip to content
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

Add the category first to the ordering when sorting by "ordering" #25295

Merged
merged 1 commit into from
Jun 25, 2019

Conversation

Bakual
Copy link
Contributor

@Bakual Bakual commented Jun 22, 2019

Summary of Changes

In backend when sorting the articles by "Ordering", it will now first order by the category title and only after that it sorts by ordering.
This is consistent with other core components (eg contacts, banners, newsfeeds) and makes drag-and-drop ordering more reliable.

Testing Instructions

  • Create multiple articles in multiple categories.
  • Order by "Ordering"
  • Check if items from the same category are grouped.
  • Move the items around - reload the page and verify that they "stick" to your order.

Expected result

Items aren't grouped by category.
Items keep in place after reloading.

Actual result

Items of the same category are right beside them.
The items jump around seemingly randomingly

Documentation Changes Required

None

@ghost
Copy link

ghost commented Jun 22, 2019

@rogercreagh
Copy link

@rogercreagh please test (how to: https://docs.joomla.org/Testing_Joomla!_patches)

Happy to do so, but it would take me several days or weeks of work to grapple with that as it looks very complex to someone who doesn't use git, has never used Joomla unit tests (or any other type of unit testing) and is a !professional software developer with better things to do than fill my brain up with a load of important stuff that I'll probably never use again.

I got in a right twizzle a few months ago when someone suggested I generate a pull request for a different problem and I then found myself lost in a flood of confusion (for a start it seems to me that a pull is actually a push and vice versa). As a result the fix that I had for some bugs in a JHtml string function have never been implemented as the case was closed. I'm reluctant to mess up this fix likewise...

On the face of it by inspecting the code it looks like it should work. Pretty much the same as my hack solution which works fine on several sites.

PS the bugs in JHtml::_('string.truncate',...) still exist but I have developed a plugin that overrides the duff core function and works fine on my sites so I'm not going to revisit that here - once bitten, twice shy!

I wish there was a way of reporting bugs and fixes in Joomla for people who find them and have identified the problems and have a fix that works but are not able to do the whole git core development thing.
And VERY many thanks to those who are able and do do all that stuff - you are heroes and I wish I could help you in some way.

@Bakual
Copy link
Contributor Author

Bakual commented Jun 23, 2019

Try with https://docs.joomla.org/Component_Patchtester_for_Testers. That's much simpler and should work for this PR just fine.

@Bakual
Copy link
Contributor Author

Bakual commented Jun 23, 2019

Also, for creating a simple PR like this one (and maybe your truncate one), it may be sufficient to use the GitHub WebUI. See https://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests

I agree, Git can be confusing. Especially at the beginning the learning curve is very steep.
The GitHub WebGUI takes care of that stuff for creating simple PRs. And the Joomla Patchtester takes care of that stuff for testing Fixes.

@Quy
Copy link
Contributor

Quy commented Jun 24, 2019

I have tested this item ✅ successfully on a2fcdda


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25295.

1 similar comment
@alikon
Copy link
Contributor

alikon commented Jun 24, 2019

I have tested this item ✅ successfully on a2fcdda


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25295.

@ghost ghost removed the PR-staging label Jun 24, 2019
@ghost
Copy link

ghost commented Jun 24, 2019

Status "Ready To Commit".

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jun 24, 2019
@HLeithner HLeithner merged commit d3e2662 into joomla:staging Jun 25, 2019
@HLeithner
Copy link
Member

thx

@HLeithner HLeithner added this to the Joomla 3.9.9 milestone Jun 25, 2019
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jun 25, 2019
@Bakual Bakual deleted the AddCategoryToOrdering branch June 25, 2019 16:46
@oorzaak
Copy link

oorzaak commented Dec 12, 2019

Hi,

I experienced a similar issue when transfering an article from one category to another. Depending on the content, it may be likely that this article will have the same ordering number as an article that is already present in the new category, giving unpredicable results. This is especially the case with articles that are newly created; typically these will have number 0. If there are more articles with numer 0 (or even with negative numbers) this gets very confusing.

Are situations like this covered by this issue # ?

@Bakual
Copy link
Contributor Author

Bakual commented Dec 12, 2019

Commenting on merged or closed PRs will not get you the attention you need.
You should instead open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants