Skip to content

{if checkboxes-field} does not work in entry preview mode #2678

Description

@intoeetive

Reported by @PaulBaileyAtChan in https://eecms.slack.com/archives/C04CUNNR9/p1672275285492719

When I preview entries for a couple of specific channels, it all looks basically okay, except that one field in each case doesn't get displayed. Tracked this down to a conditional apparently not firing as expected. These are both Checkboxes fields. In each case, using a single tag {name-of-field} or a tag pair {name-of-field}whatever{/name-of-field} to display the field values works fine. But if I use a conditional on the entire field, nothing is displayed:

{if name-of-field}
{name-of-field}whatever{/name-of-field}
{/if}

If I use exactly the same template to display the same entry outside of preview mode, the conditional works as expected, and the field values are displayed. But using it to preview the entry from within the entry manager, the conditional fails. Only thing I can imagine is that there's something about the template parse in preview mode that's different, and doesn't handle the conditional properly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug: AcceptedBug has been confirmed, is reproducible, and ready to work on.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions