J4 Issue ?
avatar PhilETaylor
PhilETaylor
19 Aug 2018

Steps to reproduce the issue

install Joomla 4 with demo data

login to admin as super admin

Go to Users -> Access Levels

Drag the hamburger icon to reorder levels OR click a level name

Expected result

the level moves

Actual result

JS error

Uncaught TypeError: t(...).find(...).andSelf is not a function

screen shot 2018-08-19 at 23 13 17

System information (as much as possible)

5defb00

avatar PhilETaylor PhilETaylor - open - 19 Aug 2018
avatar joomla-cms-bot joomla-cms-bot - change - 19 Aug 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 19 Aug 2018
avatar PhilETaylor PhilETaylor - change - 19 Aug 2018
The description was changed
avatar PhilETaylor PhilETaylor - edited - 19 Aug 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 20 Aug 2018
Status New Confirmed
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 20 Aug 2018

Issue confirmed.


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 20 Aug 2018
Category JavaScript Templates (admin)
avatar brianteeman brianteeman - change - 20 Aug 2018
Labels Added: J4 Issue
avatar brianteeman brianteeman - labeled - 20 Aug 2018
avatar C-Lodder
C-Lodder - comment - 20 Aug 2018

Does replacing the following lines: https://github.com/joomla/joomla-cms/blob/4.0-dev/administrator/components/com_users/tmpl/levels/default.php#L28-L32

with this:

use Joomla\CMS\Session\Session;

if ($saveOrder)
{
	$saveOrderingUrl = 'index.php?option=com_users&task=levels.saveOrderAjax&tmpl=component' . Session::getFormToken() . '=1';
	HTMLHelper::_('draggablelist.draggable');
}

work?

avatar brianteeman
brianteeman - comment - 20 Aug 2018

No that gives

TypeError: Cannot read property 'querySelectorAll' of null

avatar brianteeman
brianteeman - comment - 21 Aug 2018

OK I have it working - the code from @C-Lodder was almost correct - there was just some extra code needed to be added to the table and tr

However before adding it - what is the usecase for ordering in this way - I can't see it myself and so I would propose removing it

avatar brianteeman
brianteeman - comment - 21 Aug 2018

Closed as there are several views this applies to and I have created one issue for them all #21787

avatar brianteeman brianteeman - close - 21 Aug 2018
avatar brianteeman brianteeman - change - 21 Aug 2018
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2018-08-21 09:09:10
Closed_By brianteeman

Add a Comment

Login with GitHub to post a comment