Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$smarty.capture forgets captured data from included files #235

Closed
dbroeks opened this issue Jun 2, 2016 · 2 comments
Closed

$smarty.capture forgets captured data from included files #235

dbroeks opened this issue Jun 2, 2016 · 2 comments

Comments

@dbroeks
Copy link

dbroeks commented Jun 2, 2016

When upgrading from Smarty v3.1.27 to v3.1.29 I encountered the following issue:

Assume the following template files:

test-container.tpl

{include 'test-header.tpl'}

{capture container}
  <p>This is captured in the container</p>
{/capture}

{include 'test-footer.tpl'}

test-header.tpl

{capture header}
  <p>This is captured in the header</p>
{/capture}

test-footer.tpl

{capture footer}
  <p>This captured in the footer</p>
{/capture}

{$smarty.capture.header}
{$smarty.capture.container}
{$smarty.capture.footer}

You would expect the following output:

<p>This is captured in the header</p>
<p>This is captured in the container</p>
<p>This captured in the footer</p>

But the actual output is:

<p>This is captured in the container</p>
<p>This captured in the footer</p>

For some reason, the captured data from the included file test-header.tpl is gone.

@monkeylogic
Copy link

I am having this issue as well. It broke dozens of sites. Going to try an earlier release.

@uwetews
Copy link
Contributor

uwetews commented Jul 11, 2016

This was already fixed on 27.3.2016 in the master branch #153

@uwetews uwetews closed this as completed Jul 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants