Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-51145

Templates with blocks can't include other templates with blocks

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 3.0, 3.11.8, 4.0.2, 4.1
    • Themes
    • MOODLE_30_STABLE, MOODLE_311_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE
    • MDL-51145-master
    • Hide

      Note: The main thing we want to check for is regressions and hopefully the Behat coverage is sufficient for that.

      1. Unzip 51145.zip into your Moodle directory
      2. Run the included CLI script (php test-51145.php
      3. View the same file in your browser by accessing http://localhost/foo/test-51145.php
        1. Compare the outputs of the two and ensure that they match (whitespace differences are acceptable)
      Show
      Note: The main thing we want to check for is regressions and hopefully the Behat coverage is sufficient for that. Unzip 51145.zip into your Moodle directory Run the included CLI script ( php test-51145.php View the same file in your browser by accessing http://localhost/foo/test-51145.php Compare the outputs of the two and ensure that they match (whitespace differences are acceptable)

      Templates that use the blocks pragma are not able to include (as a partial) another template that uses the blocks pragma.

      In the javascript implementation it seems to render the template incorrectly because the block variables in the parent context are being cleared before trying to render the included template. I suspect this can be fixed by cloning the parent context before clearing the block vars and passing the cleaned clone through to render the included template.

      This looks like the place to make the changes.

      For the PHP implementation this causes PHP to seg fault (really weird). I'm not sure of the solution for PHP.

            Unassigned Unassigned
            ryanwyllie Ryan Wyllie
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 5 minutes
                1d 5m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.