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 flip ordering batch process to category manager #11529
Conversation
@@ -345,6 +345,7 @@ JLIB_HTML_ADD_TO_THIS_MENU="Add to this menu." | |||
JLIB_HTML_BATCH_ACCESS_LABEL="Set Access Level" | |||
JLIB_HTML_BATCH_ACCESS_LABEL_DESC="Not making a selection will keep the original access levels when processing." | |||
JLIB_HTML_BATCH_COPY="Copy" | |||
JLIB_HTML_BATCH_FLIPORDERING_LABEL="Reverse the ordering of selected categories" |
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.
Should this say reverse the order of articles in the selected categories?
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.
oh yes, you are right, can you suggest a sentence to make it clear as possible
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.
Reverse the ordering of all articles in the selected categories
thanks @brianteeman
This is not a good solution for the issue because: If you have a site with for example 102 featured aticles and the article-ordering-numbers are for example: -90 and before your solution the featured articles came in the front-end in the same order. After your solution and for example 2 new featured articles the order of the articles in front-end is: 102 First the new 2 articles then artcles in reverse oder and then the sticky-oder-articles in reverse order at last. Sticky ordering is no longer possible and 102 articles now i must sort. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11529. |
@Sieger66 This isn't for the featured article ordering it works only for the category ordering. |
But the issue is also by the featured articles! This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11529. |
yes, but let us solve one problem first an not mix problems, if we agree that here is working for categories we an easily add a flip ordering for featured articles. That's the reason I am writing test instruction to make clear what is this PR about. |
aaaahhhh, how did i forget about the negative "sticky" ordering numbers ? anyway since your reversing code uses 1 query per records Split it in 2 parts
-1 becomes -2147483648 the above is good for 32 bit / 64 bit / 128 bit , etc Then the reverse ordering
and it works you can continue to have sticky orderings by adding the new article that you want to be sticky at MAX(of negative orderings) + 1 Then we can enhance the drag and drop ordering to make use of it, |
IMHO sticky ordering, means special featured article can be wrapped by a module. About performance. Please test below queries on big tables when column ordering has an index key. ALTER TABLE `#__content_frontpage` ADD INDEX ( `ordering` ) ; Then compare two queries, you can use This query does not use index key. SELECT SQL_NO_CACHE *
FROM `#__content_frontpage`
ORDER BY CAST( ordering AS UNSIGNED ) DESC vs This query use index key and it is fast. SELECT SQL_NO_CACHE *
FROM `#__content_frontpage`
ORDER BY ordering DESC |
a union can be used to avoid the typecast |
@rdeutz : Extensions -> Modules -> New -> Articles - Category (This module displays a list of articles from one or more categories.) -> Ordering Options -> then this Modul is list the articles in reverse direction with this solution. Self Problem with other Extensions who use the ordering-numbers of articles. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11529. |
Yes this break B/C. Modules on J3.5.1 and lower works OK, but in J3.6 this is a mess. IMHO for users the best way will be
After that we can back to MAX+1 for ordering in J4. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11529. |
more and more I think about this, it seems to me that reverting the original PR that made the B/C break and then look at the performance problem is the way to go |
Fixing the JTable reorder is something to be done anyway
a PR had been proposed
I proposed another PR should work in all dbs , addressing the performance issue as it does 1 DB update per 2000 or per 10000 records
only it continues to have some medium memory requirements as existing re-order has ... if you try to re-order e.g. 20,000 records (but anyway large websites have memory limit 5x that what will be need, e.g. needed 40-50 MBs and they will have 256 MBs) #11184 we could fix the JTable reorder performance and revert the change in using last order for new articles
|
@rdeutz I think thats the only way On 10 August 2016 at 09:12, Georgios Papadakis notifications@github.com
Brian Teeman |
For reorder performance #11184 is also good, but I will have to test transaction like: BEGIN
UPDATE ....
UPDATE ....
UPDATE ....
COMMIT |
Even if you use transaction e.g. 10000 updates instead of 4 updates ? |
I have sent an email to the PLT list to vote on reverting #8576, I will let you know the result of the vote. |
i 'll respectfully wait for PLT decision, |
I hope wisdom prevails and that we indeed revert #8576 and sucessively look into the performance. Again as stated before:
|
With #11139 you do not need to do anything like manually re-arrange. Everything is automatically. Style of codding mainly has been corrected. I have problem with explaining every detail in English. |
@gwsdesk it is reverted |
Thanks the Lord ;-) On 8/24/2016 1:33 PM, Robert Deutz wrote:
|
@rdeutz as the offending PR has been reverted can this be closed? This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11529. |
The function is not bad at all so the question is will we have a possibility to flip the ordering in one go. It might to used not so often, but I have to fix the ordering on one site when I update to 3.6.3 and maybe other people need to do the same. Let us look if people test it and when it gets enough tests then it can go in. |
Robert |
I have tested this item ✅ successfully on fc4f2ed This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11529. |
What's the status here? |
I still thinks this makes sense as a function, it would need test to go in. But if nobody has really an interest it can be closed |
@rdeutz Questions for "Test Instructions":
didn't found this Setting, guess you mean (but theres no "Ordering Reverse"):
Global is set on "Ordering", Menu shows for Global: |
I cannot follow the testing instructions:
|
@franz-wohlkoenig and @carcam System -> Global Configuration -> Articles -> Shared -> Article Order -> Ordering Reverse This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/11529. |
I have tested this item ✅ successfully on fc4f2ed This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/11529. |
RTC after two successful tests in favor of resolving conflicting Files. |
@rdeutz This needs the merge conflict resolved then we can merge. |
Pull Request for Issue #11103 .
This is not a real fix for the issue, but it is a way to make the B/C break not a big pain. In combination #11475 it allows sites that are using ordering to invert the ordering of articles with one click.
Summary of Changes
It adds a yes/no select to the batch process in the category manager to invert the ordering within categories.
Testing Instructions
Note: I have tested this with a category with 30000 articles and there was only a small delay.
Documentation Changes Required
Because this is a "fix" for a B/C break we should put at a prominent place in the release notes.