J4 Issue ? ?
avatar sakiss
sakiss
14 Feb 2019

Steps to reproduce the issue

Use the \Joomla\CMS\Table\Table::save inside your Model

This function is meant abstract all the functions for saving an item (bind, check, store).
In case it gets as 2nd parameter the ordering field name ($orderingFilter), it is supposed to re-order the item, based on the existing rows in the table.

Expected result

Give a proper/incremental ordering number

Actual result

No number.
localhost_filters

System information (as much as possible)

Joomla 4.0 alpha6

Additional comments

Actual function that does the re-ordering
\Joomla\CMS\Table\Table::reorder

avatar sakiss sakiss - open - 14 Feb 2019
avatar joomla-cms-bot joomla-cms-bot - change - 14 Feb 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 14 Feb 2019
avatar sakiss sakiss - change - 20 Feb 2019
Title
[4.0] auto-ordering on item saving
[4.0] Auto-ordering on item saving Not working
avatar sakiss sakiss - edited - 20 Feb 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 3 Mar 2019
Status New Information Required
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 3 Mar 2019

@infograf768 can you please comment?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 17 Mar 2019

@wilsonge can you please comment as Release Lead 4?

avatar wilsonge
wilsonge - comment - 18 Mar 2019

No clue about this one off the top of my head. Sounds bad tho. Added it onto my list

avatar wilsonge wilsonge - change - 18 Mar 2019
Labels Added: ?
avatar wilsonge wilsonge - labeled - 18 Mar 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 27 Mar 2019
Status Information Required Discussion
avatar joomla-cms-bot joomla-cms-bot - change - 27 Mar 2019
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - unlabeled - 27 Mar 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 27 Mar 2019
Category SQL
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2019
Labels Added: J4 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 4 Apr 2019
avatar brianteeman
brianteeman - comment - 13 Dec 2019

can someone put the release blocker tag back please

avatar Quy Quy - change - 13 Dec 2019
Labels Added: ?
avatar Quy Quy - labeled - 13 Dec 2019
avatar dgrammatiko
dgrammatiko - comment - 30 May 2020

FWIW also the drag and drop functionality on any list view is based on this so also that won't work correctly

avatar sakiss
sakiss - comment - 20 Jul 2020

Maybe related with: joomla-framework/database#213

avatar SharkyKZ
SharkyKZ - comment - 26 Oct 2020

Is this a MySQL 8 issue? I can't reproduce this on 5.7.31.

avatar SharkyKZ
SharkyKZ - comment - 26 Oct 2020

One thing that doesn't make sense is that ordering condition is required for ordering to work at all. This should not be required.

avatar zero-24 zero-24 - change - 27 Oct 2020
Labels Added: ?
avatar zero-24 zero-24 - labeled - 27 Oct 2020
avatar HLeithner HLeithner - close - 24 Nov 2020
avatar HLeithner
HLeithner - comment - 24 Nov 2020

Hi @sakiss

@bembelimen and I tried to reproduce this issue and can't find a problem not by adding directly an entry to the table not by using the backend for com_content

	$componet = JFactory::getApplication()->bootComponent('com_content');

	/** @var JTable $table */
	$table = $componet->getMVCFactory()->createTable('Article');

	$array = [
		'title' => 'Test1',
		'alias' => 'test1',
		'introtext' => 'text',
		'catid' => 2,
		'language' => '*',
		'state' => 1,
	];

	$table->save($array, 'catid');

	$array = [
		'title' => 'Test2',
		'alias' => 'test2',
		'introtext' => 'text',
		'catid' => 2,
		'language' => '*',
		'state' => 1,
	];

	$table->save($array, 'catid');

this code results in a proper ordering.

I'm removing the release blocker label and would close this issue until you can provide a code to reproduce this issue.

avatar HLeithner HLeithner - change - 24 Nov 2020
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2020-11-24 20:29:34
Closed_By HLeithner
avatar HLeithner HLeithner - change - 24 Nov 2020
Labels Removed: ?
avatar HLeithner HLeithner - unlabeled - 24 Nov 2020

Add a Comment

Login with GitHub to post a comment