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

Rendering of the wagtail.core.blocks.StaticBlock

leewesleyv opened this issue · comments

Hi,

I've noticed an issue with the rendering of a StaticBlock using wagtail-react-streamfield==0.8.5 in combination with wagtail==2.2.2.

In these 2 cases I would be presented with an input field instead:

class LatestCoursesBlock(blocks.StructBlock):
    static = blocks.StaticBlock(admin_text="Latest courses: no configuration needed.")

    class Meta:
        template = 'latest_courses.html'
        icon = 'fa-graduation-cap'

screen shot 2018-10-15 at 17 47 44

class LatestCoursesBlock(blocks.StaticBlock):

    class Meta:
        template = 'latest_courses.html'
        admin_text = "Latest courses: no configuration needed."
        icon = 'fa-graduation-cap'

screen shot 2018-10-15 at 17 45 02

If you need more information I would be happy to supply it for you.

Thanks in regards!

I have nearly identical experience with static block, instead of admin text I see empty input field in admin with wagtail v2.2.2:

class AuthorBlock(blocks.StaticBlock):

class Meta:
    icon = 'user'
    label = 'Author Profile'
    admin_text = '{label} : is configured by User Profile snippet'.format(label=label)

Fixed by e364e71 and released in 0.9.0.

Awesome!