wagtail-deprecated / wagtail-react-streamfield

Powerful field for inserting multiple blocks with nesting. (NO LONGER MAINTAINED - See Wagtail 2.13 Release Notes)

Home Page:https://wagtail.github.io/react-streamfield/public/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reordering blocks not saved

grasshoppermouse opened this issue · comments

I have the following stream field:

description = StreamField([
        ('heading', blocks.CharBlock(classname="full title")),
        ('paragraph', blocks.RichTextBlock(icon='pilcrow')),
        ('image', ImageChooserBlock(icon='image', template='department2/blocks/image.html')),
        ('image_carousel', blocks.ListBlock(ImageChooserBlock(), template='department2/blocks/image_carousel.html')),
        ('embedded_video', EmbedBlock(icon="media")),
    ])

When I reorder the top-level blocks (e.g., heading or paragraph) via drag-and-drop or arrows, and then Publish, the reordering is preserved. However, when I reorder the images in the image_carousel, the reordering is not preserved on Publish.

However, when I use the standard wagtail admin (no react-streamfield), it works fine, and reordering is preserved at all levels.

Any ideas?

I can’t reproduce the issue, even with exactly the same blocks as you.

Could you tell me the following?

  • which version of Wagtail & wagtail-react-streamfield you’re using
  • is the issue happening when you reorder with drag-and-drop, arrows, or both? You mentioned it for top-level blocks, but not for the image carousel.
  • is this occurring with DEBUG = True, DEBUG = False, or both?
  • ideally, could you make a video of the issue?

wagtail 2.4
wagtail-react-streamfield 1.1.0
DEBUG: True or False
It happens using drag-and-drop or arrows

It doesn't happen for the top levels blocks, but it does happen for the carousel.

Here is a screencast:

https://gfycat.com/TartSaneImperatorangel

Mmm, weird, I still can’t reproduce it.
Could you force refresh the browser cache with ctrl+F5 (on Linux/Windows) and retry?

I did "Empty Caches" in the Safari Development menu (which fixed the last problem I had). But it doesn't fix this issue. Also tried it in Chrome after clearing the cache, and again, the problem is still there.

I see something weird in your screencast though.
Your duplicate icon doesn’t work, it’s a square floating on the right. This shouldn’t be, there is a new icon I added to the Wagtail font. could you see if there is an error in the developer console, please?

Could you try again with 1.1.1 please?

Tried it with 1.1.1 after cleaning cache; problem is still there.
No errors in javascript console.
Duplicate icon is still a square in Chrome, but now floating to the left of the trashcan. It's to the left but now invisible in Safari.

Could you try again with version 1.2.0 please?

It's working now. Thanks!