No Code Attached Yet
avatar carlitorweb
carlitorweb
2 Oct 2021

Steps to reproduce the issue

  1. Create 2 categories
  2. Create 1 article inside each category.
  3. Put as Featured both articles
  4. In the administrator side, go to the Featured Articles view, and reorder the articles using the drag and drop characteristic.
  5. Refresh the administrator Featured Articles view

Expected result

Both articles keep the order you establish

Actual result

The articles did not respect the order you established, and back to the same initial order they had.

System information (as much as possible)

A fresh J4.0.3 site in: https://launch.joomla.org/

Additional comments

If you do the same, but having both articles in the same category, all work as expected.

avatar carlitorweb carlitorweb - open - 2 Oct 2021
avatar joomla-cms-bot joomla-cms-bot - change - 2 Oct 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 2 Oct 2021
avatar brianteeman
brianteeman - comment - 3 Oct 2021

In the menu item you need to set Category to no-order and Articles to featured-order

image

avatar carlitorweb
carlitorweb - comment - 3 Oct 2021

In the menu item you need to set Category to no-order and Articles to featured-order

image

But this is also needed for the administrator area? What I reporting here is only inside the administrator area, not in the frontend where that menu item should have effect.

Anyway, I tested and after create a menu item in a fresh 4.0.3, who have this options you mention, do not cause any change.

avatar brianteeman
brianteeman - comment - 3 Oct 2021

Sorry I misunderstood your original post

avatar carlitorweb
carlitorweb - comment - 3 Oct 2021

@brianteeman is okay, maybe I did not explain myself as good as I though. I trying find the problem, but so far the method saveOrderAjax() and saveorder($pks = array(), $order = null) look good. Seen is some kind of js problem...somehow do not let the table->store(), save the correct values in the frontpage table when the articles come from a different category.
But then, all work okay when come from the same category and that make the js assumption invalid.

In all my sites, the users use this view, so is kind of a critical problem for me.

avatar carlitorweb carlitorweb - change - 3 Oct 2021
The description was changed
avatar carlitorweb carlitorweb - edited - 3 Oct 2021
avatar carlitorweb carlitorweb - change - 3 Oct 2021
Title
[4.0] Reorder featured articles, is not respecting the order you establish if the articles come from a different category
[4.0] Reorder by drag and drop the featured articles, do not save the correct order in the administrator area
avatar carlitorweb carlitorweb - edited - 3 Oct 2021
avatar dgrammatiko
dgrammatiko - comment - 3 Oct 2021

@carlitorweb can you test removing the data-draggable-group="<?php echo $item->catid; ?>" from

<tr class="row<?php echo $i % 2; ?>" data-draggable-group="<?php echo $item->catid; ?>"

avatar carlitorweb
carlitorweb - comment - 3 Oct 2021

@carlitorweb can you test removing the data-draggable-group="<?php echo $item->catid; ?>" from

<tr class="row<?php echo $i % 2; ?>" data-draggable-group="<?php echo $item->catid; ?>"

It worked like a charm! You save my day, thank you. Do you think this change could cause any break in other place? I do not think can cause any problem, but just for be sure

avatar dgrammatiko
dgrammatiko - comment - 3 Oct 2021

No, that piece of code shouldn’t be there in that view. How do I know? I wrote the first version of drag and drop 😄

avatar dgrammatiko
dgrammatiko - comment - 3 Oct 2021

@carlitorweb if you can mark your successful test in the issues.joomla.org the fix would be available in one of the next versions. The PR is #35741

avatar richard67 richard67 - change - 3 Oct 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-10-03 18:44:13
Closed_By richard67
avatar richard67 richard67 - close - 3 Oct 2021
avatar richard67
richard67 - comment - 3 Oct 2021

Closing as having a pull request. Please test #35741 . Thanks in advance.

Add a Comment

Login with GitHub to post a comment