Im having trouble understanding whats going on. Everything was working great, then suddenly, after i added some files through finder; the home page which is a one-page getting subpages through the UID technique, does not get the footer, or other pages. It shows nothing apart from the header. My other dilemma is that the Panel won’t let me change templates from default to project. It accepts my choice but makes no changes; it stays at the default template and displays the pages file name instead of its title. Im on local host, with codekit as a preprocessor.
I tried reinstalling Kirby and the panel but that did nothing. When i remove the UID snippet the footer is displayed.
Would be interesting to see your snippets. What I find surprising is the path you pass to the snippet function for header and footer. Are those not located in the snippets folder?
Edit:
What sort of files did you add and where?
So you don’t get any error messages but the filename of the content file is not changed? Does this happen with any page or only with particular pages? Does the panel save other changes?
I added pngs and svgs to the folder from finder, and changed the filenames on existing files.
The problem was with one page in particular(project), and after i dug around today with fresh eyes Kirby had generated a new page.txt file(as page worked but project didn’t) in one project and replaced the previous ones on the other projects also with page. Therefor most of the information was gone from the templates and could no longer be displayed.
After changing back the filenames manually and removing some added spaces between the categories in my projects blueprint file, i managed to get it working. This also made the homepage work again, where i pull in one project from a loop in a snippet(for children) called work.(one-page setup) The problem was that the uid snippet above stopped all page generation below it(footer worked above it), and im guessing this had to do with the fact that it could not find any projects in my projects folder as they didn’t have the proper template dedicated(guessing here:) ).
Come to think of it, i might have changed the file name of the page txt files as well… That could be why(!)
Like i said its all working again now, but i would really want to understand why this happened to avoid it in the future.
My first action will be to start using Tower and version control:)
My snippets are all located in the snippets folder, though not directly. I sort them in folders as modules or page specific. For the homepage my snippets are in the snippet root folder as it wouldn’t work other wise. For site wide snippets i have them in a folder called site, as you can decipher from above. My work snippet below:
Its still acting up, and even without altering text files on the projects. It is however only on the project page that this happens. My blueprint for this page is quite long, but i can’t find any errors with it. And it works fine 95% of the time. The work around when this happened was to remove the text file that was called project.txt. save the page as a different template in panel (page) and the change it to project again afterwards in the panel, and replacing this with the original project.txt file. This worked but it seems far from bulletproof… The blueprint for the template below.
<?php if(!defined('KIRBY')) exit ?>
title: Project
pages: false
files: true
fields:
caption:
label: Image Caption
help: Image SEO
type: textarea
altText:
label: Alt Text
help: Image SEO
type: textarea
fields:
seo:
label: SEO
help: Search Engine Optimisation
type: headline
description:
label: Page Descripton
help: This text will only be displayed in search results and is important for SEO
type: textarea
size: small
buttons: false
hero:
label: Hero
type: headline
coverImage:
label: Cover Image
help: Select the Main image
type: image
width: 1/2
thumbnail:
label: Thumbnail
type: image
width: 1/2
title:
label: Page title
type: title
subtitle:
label: Subtitle
type: title
intro:
label: Introduction
help: A short description of the project.
type: textarea
size: small
buttons: false
identityheader:
label: The Identity
type: headline
identitytoggle:
label: Illustrate the identity
type: checkbox
text: Do you want to display the identity section?
identityImages:
label: The Identity
help: Logo, Typography, Colors etc.
type: selector
mode: multiple
size: 2
filter: ci
types:
- image
identityText:
label: Text
type: textarea
websiteheader:
label: The Website
type: headline
websitetoggle:
label: The Website
type: checkbox
text: Do you want to display the website section?
browser:
label: In the Browser
help: Show samples of the website in the browser.
type: image
width: 1/3
ipad:
label: On iPad
help: Show samples of the website on iPad.
type: image
width: 1/3
iphone:
label: On iPhone
help: Show samples of the website on iPad.
type: image
width: 1/3
websiteText:
label: Text
type: textarea
link:
label: External Website
type: url
width: 1/2
visit:
label: Name the link
help: Visit "Project Name"
type: text
width: 1/2
printheader:
label: Printed Material
type: headline
printtoggle:
label: Illustrate the print material
type: checkbox
text: Do you want to display the print section?
printImages:
label: Show Some examples of the Print Material
type: selector
mode: multiple
filter: print
types:
- image
printText:
label: Text
type: textarea
docuheader:
label: The Documentation
type: headline
docutoggle:
label: The Documentation
type: checkbox
text: Do you want to display the documentation section?
docuTitle:
label: Name the category
placeholder: Documentation
type: title
docuImages:
label: Show Some examples of the Documentation
help: Event, Venue, Usage etc.
type: selector
mode: multiple
filter: docu
types:
- image
docuTitle:
label: Name the category
placeholder: Documentation
type: title
docuText:
label: Text
type: textarea
ourServices:
label: Services Provided
type: headline
keywords:
label: Keywords
help: These keywords will also be display in search results and is important for SEO
type: tags
I’m not sure if the blueprint is the problem, but when i deleted some images from the project folder, the panel changed the template to default, and i could no longer change it back. This problem is isolated to the project where i deleted the images, because i could change the template on other pages. However i had to do the “workaround” that i explained above to get it to change back to the wanted template which the above blueprint represents.
I’m not sure how you can help really, but thought maybe this is something others have experienced to…?
How did you delete the images? Via the file system? If so, have you made sure to also delete any file meta data files? If you have any text files in a folder that are not either the content file or meta data files that match with the filenames of the files in the folder, you will get the described effect.