122 Posts
deralex
1 year ago
7
Topic

I try creating as list with drag and drop ordering as described here: https://www.seblod.com/resources/tutorials/adding-drag-and-drop-ordering-functionality-to-your-front-end-managers

I use Joomla 4 with Seblod 4, exactly identical configuration as in another installation of Joomla 3. I think the former field "CCK" now is called "Core ID". In Joomla 4 I can drag a list item, but with mouseup, the item jumps back to the former position.

Do I have to change something in Joomla 4?

Get a Book for SEBLOD
47 Posts
StanislavR
1 year ago
4
Level 1

Hi,

Check if there is an «Article Category Id» field on your page

122 Posts
deralex
1 year ago
3
Level 2

Adding Article Category ID doesn't help.

Dragging works, but the positions don't flip. Also in Joomla administration after dragging, there's an AJAX call like http://www.mydomain.com/administrator/index.php?option=com_content&task=articles.saveOrderAjax&tmpl=component&abcabcabcabcabcabcabc=1 . Seblod doesn't send the call. 

47 Posts
StanislavR
1 year ago
2
Level 3

Hi,

my english only google translate, sorry

1. Works on a clean install Seblod

2. After 3->4 update I had this problem - item not fixed in the right place when dragging

3.This helped me:

3.1 In list settings (List -> Template) there is a parameter:  data-draggable-group="$cck->getValue('art_catid')"

3.2. So on the page there should be a field 'art_catid'

4.now works

Also carefully compare the settings of a clean installation and your site.

best regards

150 Posts
MtnPavlas
1 year ago
1
Level 4

StanislavR, can you please post a screenshot of the template config so we can see where you enter the data-draggable-group=... parameter? I don't see an option to enter it, nor was it in there by default. Thank you!

152 Posts
pixelpixel
5 months ago
0
Level 5

Hi,

maybe its too late, but I know what Stanislav meant (thx a lot!):

1. Add: data-draggable-group="$cck->getValue('art_catid')" to the "Custom Attr. per item" field (List -> Template)

2. Add Article Category ID to your List View (i have no idea why...)

3. Do not forget to switch your "Default Order" to "Ordering" (List -> Configuration)

Hope this will help everyone with the same issue 🙂

47 Posts
StanislavR
5 months ago
0
Level 1

Hi

You must do everything according to the instructions.
And then check (enter if not after update 3->4):

so that the code $cck->getValue('art_catid'); outputs the value, the field art_catid must be placed on the page

drag-and-drop not work in free content

Stanislav

150 Posts
MtnPavlas
2 days ago
0
Level 1

Thanks for the tips (and pardon to resurrect an older post... but figured it's best to keep the same topic in one place).

Using the category ID field and the custom attribute as outlined in the very helpful post by Stanislav above. The result is that I can now drag and drop the items/rows in the table on the front end, but the order change doesn't actually get recorded in the database. I.e., the change takes no effect. I don't see any javascript errors in the console, except for "Duplicate form field id in the same form" - don't think that has an effect here, does it? Also, I can't actually find two same field ID's in the rendered page HTML so not sure why the console is throwing this error/issue.

If you can think of anything else to check on, please share. I have followed the tutorial listed by the OP above. Search used to work, but stopped at some point w/ one of the Seblod 4 versions. Same results w/ Seblod 4 and 5.

Get a VIP membership