?
avatar nozaro33
nozaro33
3 Jun 2021

Hi, I had noticed this bug in beta 8, but given it was nightly build I wasn't sure if there was something wrong with my build so didn't report it. I have tested this issue on a site that was updated from beta, and also a clean install of RC1.
You can drag and drop to change ordering on categories (appears to be fine when categories are all root)

But when you have more category trees, (various levels) Sometimes it doesn't work and js console will show an error. "Cannot read property 'value' of undefined". Once this error appears, it can kill some other functions on the page. (I can't use batch unless I refresh page, See video below. )

I've seen this happen also on menu and plugin pages, but I'm not sure how to reproduce so I won't put it here for now.

Steps to reproduce the issue

Create multiple categories with various levels.
Try to change ordering of categories
(See video below)

Expected result

Should work as expected

Actual result

Will appear "Cannot read property 'value' of undefined" in console error resulting in unable to change order, when category have multiple levels

System information (as much as possible)

Joomla 4 RC1
Mysql 5.7.26
PHP 7.4.2

drag-drop-issue.mp4
avatar nozaro33 nozaro33 - open - 3 Jun 2021
avatar joomla-cms-bot joomla-cms-bot - change - 3 Jun 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 3 Jun 2021
avatar sandramay0905
sandramay0905 - comment - 3 Jun 2021

If this is the wrong place please tell me, will open a new issue*).

Similar issue in administrator-modules: Reordering User Status before Frontend Link seems to work, after page-reload the ordering is lost.

1

*) no error in browser-console so i thinks its another, but similar issue.

avatar joomdonation
joomdonation - comment - 3 Jun 2021

I think the issue is the same. I think I/we will have to review the re-ordering logic implemented on the PR #33937. Look like we are having issues with re-order grouped items.

avatar nozaro33 nozaro33 - change - 3 Jun 2021
Title
Issue with drag & drop ordering
[4.0] Issue with drag & drop ordering
avatar nozaro33 nozaro33 - edited - 3 Jun 2021
avatar joomdonation
joomdonation - comment - 3 Jun 2021

@dgrammatiko @Fedik Does Dragula allow drag nested elements? From what I see right now, when we drag and parent category to new position, only that parent category is moved, not it's child categories ?

avatar joomdonation joomdonation - change - 3 Jun 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-06-03 15:28:17
Closed_By joomdonation
avatar joomdonation joomdonation - close - 3 Jun 2021
avatar joomdonation
joomdonation - comment - 3 Jun 2021

@nozaro33 @sandramay0905 Could you please help testing the PR #34375 ? Thanks !

avatar nozaro33
nozaro33 - comment - 3 Jun 2021

@joomdonation Hey Tuan, going to bed soon will test tomorrow morning! Thanks!

avatar joomdonation
joomdonation - comment - 3 Jun 2021

Great. Thanks @nozaro33

avatar Fedik
Fedik - comment - 3 Jun 2021

Does Dragula allow drag nested elements?

sorry for delay,
I think it only would work if the children located in the same container with parent, in the same div element,
but we have each item (parent and child) as own element

avatar dgrammatiko
dgrammatiko - comment - 3 Jun 2021

but we have each item (parent and child) as own element

Yes and also we have a data attribute that indicates the parent of each element. Anyways @joomdonation figured it out

avatar joomdonation
joomdonation - comment - 4 Jun 2021

@dgrammatiko @Fedik Actually, I can only fix the ordering issue. The issue with drag and drop nested element is still there. You can see the issue here #34375 (comment) (In J3, we handles it better)

avatar dgrammatiko
dgrammatiko - comment - 4 Jun 2021

In J3, we handles it better

What's the behaviour in J3? Reload?

avatar joomdonation
joomdonation - comment - 4 Jun 2021

What's the behaviour in J3? Reload?

Somehow, in J3, when we drag and drop the parent categories, it's the children categories (actually the whole category tree are moved to new position). And no, it is not reload.

Add a Comment

Login with GitHub to post a comment