Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • mc2 13 posts 74 karma points
    Apr 19, 2023 @ 05:36
    mc2
    0

    Block Grid settings not saving when not opened once

    Hi, in the block grid if I don't open the settings tab for any block that has settings it won't save default values, for example, I have a toggle that is true by default and it will be false until I open settings tab for the first time and save the page, is it expected behavior?

  • Marc Goodson 2155 posts 14408 karma points MVP 9x c-trib
    Apr 19, 2023 @ 08:55
    Marc Goodson
    0

    Hi mc2

    I think the confusing thing about True/False toggle, is that the initial value, isn't the default value for the property if it hasn't been saved, it is just the initial value when an editor sees the toggle in the backoffice when they create a new content item... so I think you are describing expected (although unwanted) behaviour.

    What I tend to do is name the True/False toggle so that it 'not being set' means false, and that is then the default behaviour I want.

    So if I have a ShowRelatedPosts True/False, and 99% of content items need to have this ticked, then I'll rename it to HideRelatedPosts, and then if it's not set, the default value will be False, which is what I mainly want.

    regards

    Marc

  • mc2 13 posts 74 karma points
    Apr 19, 2023 @ 09:12
    mc2
    0

    Hi, thanks for your reply.

    When a user opens a block to edit shouldn't settings be also saved even if they have not been opened? If I create a new content node and don't open a tab where there is a property that has the default value true, it is saved true as expected, shouldn't this work for block list/block grid the same?

  • Marc Goodson 2155 posts 14408 karma points MVP 9x c-trib
    Apr 19, 2023 @ 09:32
    Marc Goodson
    100

    Hi mc2

    You would definitely want it to behave like that for sure!

    And it's worth creating as a bug in the tracker, as I don't think it's intended!

    But I suspect, that as there is a different underlying Document Type to describe the Settings, of a block, that somehow that isn't opened, unless it's switched too (whereas tabs are all loaded at the same time) - so I think it's possible to Save the block without the settings being opened and therefore the initial value for the checkbox doesn't get saved?

    So I'd expect it to have that issue, given how the initial value for a toggle is implemented, but I'm not saying it's a good thing!

    regards Marc

Please Sign in or register to post replies

Write your reply to:

Draft