I am having an issue with blueprints not working in production.
I have a shop page with a shop.yml file in my blueprints/pages
title: Shop
columns:
- width: 1/2
sections:
content:
type: fields
fields:
title:
label: Title
type: text
shoplink:
label: Shop Link
type: url
- width: 1/2
sections:
published:
label: Shops Archive
type: pages
templates: grouping
on my local dev it looks correct like this:
but on deployment its completely different and wrong.
instead of seeing the shop.yml
i am seeing another page blueprint instead.
Any thoughts as to why?
Is that your default blueprint?
no that is not the default blueprint.
there are 3 other page blueprints that connect to each other. realted.yml is the parent
related.yml:
title: Related
columns:
- width: 1/2
sections:
info:
type: info
label: News page info
text: |
Start a new article in the Drafts section by clicking +Add.
To make a new Announcement click the Announcements page.
- width: 2/3
sections:
published:
label: Published Exhibition News
type: pages
layout: table
status: listed
templates: grouping
limit: 10
columns:
count:
label: Article Count
value: "{{ page.children.count }}"
date:
label: Publish Date
value: "{{ page.published.toDate('F j, Y') }}"
- width: 1/3
sections:
drafts:
label: Drafts Exhibition News
type: pages
status: draft
layout: table
templates: grouping
limit: 10
content:
type: fields
fields:
announcements:
label: Announcements
type: pages
layout: table
templates: grouping
query: page.children.filterBy("headline", "Announcements")
I am seeing related.yml instead of shop.yml for some reason.
Check what files are in your shop folder on production
the shop.yml is exactly the same in production:
title: Shop
columns:
- width: 1/2
sections:
content:
type: fields
fields:
title:
label: Title
type: text
shoplink:
label: Shop Link
type: url
- width: 1/2
sections:
published:
label: Shops Archive
type: pages
templates: grouping
one additional thought/note. Could there be something going on with the snippets and templates shop.php?
I just dont know why it would work in development and not in production…
The shop issue is resolved.
For some reason in the shop content folder there was a related.txt instead of the shop txt.
Replacing it with my shop.txt solved that issue.
Now I have one final dev vs. prod issue with blueprints.
In development this code works on my site.yml:
- width: 1/1
sections:
published:
label: Published Articles
parent: site.find("related")
type: pages
layout: table
templates: grouping
limit: 10
columns:
count:
label: Article Count
value: "{{ page.children.count }}"
date:
label: Publish Date
value: "{{ page.published.toDate('F j, Y') }}"
however in production I get this error:
The section “published” could not be loaded: The parent for the query “site.find(“related”)” cannot be found in the section “published”
This tells you that there is no page called related, at least not on the first level
I guess im confused because there is a page called related. Here is my blueprint/pages folder:
Is there a reason this section of my site.yml blueprint works perfectly in development and not in production?
What you are showing me is the blueprint, not the related
folder inside /content. All pages live inside that /content
folder.
Ahhh, okay. Thank you! Yes this solved it.
At some point the page called related was renamed in the content folder and this was the issue.