Skip to content

template layouts are broken in 7.4.2 #4102

Closed

Description

@jelle-burodeng

When you have multi step layouts, {layout:set name="something"}bla{/layout:set}
doesn't work anymore

To reproduce:
template 1: dev/landing
{layout="dev/landing_2"}
{layout:set name="iets" value="bla"}
Template 2: dev/landing_2
{layout="dev/wrapper"}
{layout:set name="body_content"}
this is the body_content
{/layout:set}
Template 3: dev/wrapper
<!doctype html>

Here the body_content should show: {layout:body_content}

The layout:body content isn't set

Activity

  1. jcogs-design commented on Mar 1, 2024

    @jcogs-design
    Contributor

    Can confirm same happens on an unrelated EE7.4.2 system I have running either php 8.1 or php8.2

  2. jcogs-design commented on Mar 1, 2024

    @jcogs-design
    Contributor

    Had a quick look and seems to throw a warning relating to the value of $item in function call to _parse_var_single which is unset ... as it seems when the parseLayoutVariables() method of the EE_Template class parses the tag-pair form of layout:set it seems to get confused in a loop beginning at line 714 - concluding that {layout:set name="blah"} ... {/layout:set} is an attempt at recalling a layout variable called set ... and gets into a mess when it can't find it...

  3. added
    Bug: AcceptedBug has been confirmed, is reproducible, and ready to work on.
    on Mar 4, 2024
  4. added a commit that references this issue on Mar 4, 2024
    7709ef4
  5. added a commit that references this issue on Mar 4, 2024
    f70d3af
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions