Closed biki closed 5 years ago
Half of that issue was fixed by https://github.com/wagtail/react-streamfield/commit/e775cd303323daabc6de824d23b1d74d6cb35354. That fix is for the exclusive selection of a single radio button at a time.
What remains is to fix the CSS issue, it’s purely wagtail related.
The style issue was fixed by 45dcaf232020c0adc8af7db5917536d9b1c0de82, and the react-streamfield fix is in the version used by wagtail-react-streamfield now.
So everything here is fixed, and will be in the new wagtail-react-streamfield version :)
Unfortunately I have to open this issue again, it is still somewhat broken in 1.3.0
Getting the following error:
If you need more information from me, please say so. Thank you.
@biki Did you try force-refreshing the browser? With ⌘
+shift
+R
on Apple computers and ctrl
+F5
on everything else.
Yep. I know that Wagtail sometimes bugs out after updating but I've cleared the cache multiple times.
Was it using the exact RadioBlock
you defined above? I’m asking because that’s what I used for testing, and it was working flawlessly.
Yep, using the same definition on Wagtail 2.6.1
I'm using RadioBlock
like this:
image_text_cubes = ('image_text_cubes', blocks.StructBlock([
('title', blocks.CharBlock(required=False)),
('cubes', blocks.ListBlock(blocks.StructBlock([
('image', ImageChooserBlock()),
('image_position', RadioBlock(choices=DEFAULT_ALIGNMENT_CHOICES[:2], default='left')),
('title', blocks.CharBlock()),
('content', blocks.RichTextBlock()),
('list_style', RadioBlock(choices=DEFAULT_LIST_CHOICES, default='dash')),
('call_to_actions', blocks.ListBlock(CallToActions(), default=[], required=False, null=True, blank=True)),
]))),
], template='content/blocks/image_text_cubes.html', icon='fa-cubes', group=GROUP_NAME))```
OK, I can confirm I see a buggy behaviour with RadioBlock
after values were saved with the old StreamField. I’m investigating it.
That last issue was fixed by df10ce3caeab994cb2864b18d611ef3cdfe37ff6. It was a bad radio serialization issue. I discovered another issue at the same time, one method was not correctly monkey patched, so the error messages were no longer shown in the field blocks.
That should fix your issue, tell me otherwise!
I forgot to tell you, it’s in a new 1.3.1 release.
Wagtail 2.4 Wagtail react streamfield 1.2.0
Radio buttons within the edit form don't have enough space and grow into each other. Also they look like they're not properly given a name attribute which is why you're able to select more than one.
Note that radio buttons are not default Wagtail, but a customized ChoiceBlock: