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

Ordering modules bug #44545

Open
niosme opened this issue Nov 28, 2024 · 9 comments
Open

Ordering modules bug #44545

niosme opened this issue Nov 28, 2024 · 9 comments

Comments

@niosme
Copy link

niosme commented Nov 28, 2024

Steps to reproduce the issue

When we have our modules shorted, we filter by position e.g. footer and then we enter in some modules and change the name , permissions or something is changed and we save it the order is changing.

https://www.awesomescreenshot.com/video/34097008?key=8514d5e511a9179ccb0ccc08ac81d171

Expected result

Keep the ordering as it was if we dont change it.

Actual result

Ordering changes and this have result in the frontend.

System information (as much as possible)

Joomla 5.2.2

Additional comments

When we just logged in and we do this even the outer drag to position doesnt work. In the video it worked fine. I had to play a little on the modules list to make the drag to sort work fine.

@fgsw
Copy link

fgsw commented Nov 28, 2024

@niosme Can you write an example of your Issue? I have watched your video 2 times and didn't get the point, where your Issue happen.

@niosme
Copy link
Author

niosme commented Nov 28, 2024

@niosme Can you write an example of your Issue? I have watched your video 2 times and didn't get the point, where your Issue happen.

Here is a more clear video:

https://www.awesomescreenshot.com/video/34097008?key=8514d5e511a9179ccb0ccc08ac81d171

After a long time of playing and just changing the names it works fine. But the most time the order is changing.

@fgsw
Copy link

fgsw commented Nov 28, 2024

@niosme Did you get your Issue on a clean Installation (without 3pd-Modules like "Filter - Tags" showing at 00:25 in your second video)?

@Fedik
Copy link
Member

Fedik commented Nov 28, 2024

I going to set it as a bug.
I have the same problem sometimes, however it happens very randomly, and hard to reproduce.

If someone can discover a clear pattern when and why it happening, that would be very helpful.

@Fedik Fedik added the bug label Nov 28, 2024
@niosme
Copy link
Author

niosme commented Nov 28, 2024

@niosme Did you get your Issue on a clean Installation (without 3pd-Modules like "Filter - Tags" showing at 00:25 in your second video)?

Yes even with the default and without third party modules this occurs.

It always happen to me if i filter by position and then try to save it because its easily visible. The bad thing is the frontend which changes.

But also have occured event without filter. But its easier to check it if you filter by position and you have not a lot of items.
If you start playing a lot after a lot of saves it works fine. Like everything take its position and then its fine.

I will check the database changes and the form data sended like ordering that is going to be saved when i find some time to understand the reason and help with this.

Also the ordering on drag n scroll from the list have the same issue sometimes. If we change the order and refresh the page the ordering is not what we setted visually.

Ill try to figure it out.

@pixelhexe
Copy link

@niosme This problem sounds familiar to me. In your video on the modules overview there is the column "Pages" with values all "Selected".

Do the modules on the position "top-a" belong all to the same page(s)? Or what happens if you filter the page where your module is included BEFORE you edit your module? Filter options on the modules overview: "- Select Menu Item -"?

I remember that the order of modules only works properly in combination with the suitable menu item.

@reDimDev
Copy link

We have encountered this issue several times and can roughly explain its cause.
The problem lies in the Edit View of the module, where the ordering field incorrectly uses the ordering value from the database.

If a module has a value of "5" in the "Ordering" column in the database and the ordering field provides 8 options, the field positions the module in the 5th spot (see Appendix A).
If a module has a value of "14" in the "Ordering" column in the database but the ordering field provides only 8 options, the field places the module in the 1st spot (see Appendix B).

Although the ordering field uses the correct sequence in its list, the value should not correspond to the position in the list. Instead, it should reflect the ordering value from the database.


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

@reDimDev
Copy link

I forgot to add downlaod links to the images.

https://redim.de/media/downloads/appendix_a.zip

https://redim.de/media/downloads/appendix_b.zip


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

@joomdonation
Copy link
Contributor

Today, I saw a similar issue on one of client website which is on Joomla 4.4 and MariaDB 11.4.5. It is related to this issue #42333. So:

  • If you are using Joomla 5 and still have the issues, it could be because the server is still running on MariaDB 10.x? If so, update to MariaDB 11.x would solve the issue
  • If you are using Joomla 4 with Maria DB 11, you can fix it by modifying code in the file libraries/vendor/joomla/database/src/Query/MysqlQueryBuilder.php using the code provided here [2.0] Backport PR #300 for MariaDB >= 11.0 compatibility joomla-framework/database#314

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

No branches or pull requests

8 participants