Grav-plugin-admin: Blueprint default override header.visible not respected by admin page creation

Created on 14 Mar 2020  路  2Comments  路  Source: getgrav/grav-plugin-admin

In an inherited theme, I make an 'item.yaml' blueprint that extends the parent (Quark, in this case) theme's 'item.yaml':

extends@: item

form:
  fields:
    tabs:
      fields:
        advanced:
          fields:
            overrides:
              fields:
                header.visible:
                  toggleable: false
                  default: 0

In 1.6.x, when using the Item template to create a page 'New Item' in Admin with the setup outlined above, clicking 'Save' automatically creates the following code in the new page's header:

---
title: 'New Item'
visible: false
---

However, in 1.7.0-rc.7, doing so omits the visible: false line, even though the admin GUI correctly shows 'Disabled' as selected next to the 'Visible' item. To have the visible: false line saved to the page header requires manually clicking on the 'Disabled' button in the GUI and then saving the page.

bug

Most helpful comment

@paulrudy As a workaround add also visible field (works only in Flex pages).

All 2 comments

Reproduced the issue. This can be reproduced also in Grav 1.6 / Admin 1.9.

@paulrudy As a workaround add also visible field (works only in Flex pages).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

darkroastcreative picture darkroastcreative  路  4Comments

coolemur picture coolemur  路  3Comments

maciejmatu picture maciejmatu  路  3Comments

artofthesmart picture artofthesmart  路  4Comments

Genenenenaam picture Genenenenaam  路  5Comments