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

{{ content }} tag turns empty when adding yaml to the top of a template #642

Closed
warkior opened this Issue Apr 28, 2016 · 0 comments

Comments

Projects
None yet
2 participants
@warkior

warkior commented Apr 28, 2016

Steps to reproduce

  1. Install statamic 2.0.3, keep using Redwood theme
  2. Create new page using /cp
  3. Create new template for the page, can copy page.html template from redwood. Link the page to the template.
  4. See that the page appears properly and content is displayed
  5. Add custom yaml variables to the top of the template. as shown below
  6. See that the page content has disappeared when viewed.

Sample template content


---
scripts_content: test

---
<section class="regular">

    <header>
        <h1>{{ title }}</h1>
        {{ sub_title wrap="h2" }}
    </header>

    <article class="content">
        {{ content }}
    </article>

</section>

Sample page content


---
title: Sample Page
id: 06db486c-72c8-48ea-bf28-396ff5e82aca
template: sample

---
This is my sample page which should use a custom template.

Expected behaviour

The content should be displayed properly, regardless of yaml at the top of the templates.

Actual behaviour

The content disappears when yaml is added. The {{ content_raw }} tag DOES still appear to work.

Server configuration

Operating system: Homestead (ubuntu)

Web server: nginx

PHP version: 5.6

Statamic version: 2.0.3

Updated from an older Statamic or fresh install: Fresh

List of installed addons: na

Logs

Statamic error log (/local/storage/logs/statamic.log)

no log entries related to this...

Browser log

na
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment