Oh noā¦ so Iām missing some Panel fields after updating, making changes, and reuploading my Kirby site. Iāve tried searching everything I can find, but my custom blueprint fields are defaulting back to Title and Text. They appear on my local MAMP setup, but go missing once I deploy to both staging and production servers.
Looking at the files on the server, all of this is the same in the blueprint. The content files also have all of the information, as does the actual output on the webpage. But the Panel is not showing these fields!
title: Listography Post
pages: false
files:
sortable: true
fields:
title:
label: Name
type: text
icon: user
required: true
width: 1/2
business:
label: Business
type: text
icon: home
required: true
width: 1/2
text:
label: About
type: textarea
required: true
featured:
label: Featured Items
type: structure
entry: >
{{name}}<br />
{{description}}<br />
{{relatedPage}}
fields:
name:
label: Name
type: text
required: true
description:
label: Description
type: textarea
required: true
relatedPage:
label: Related Page
type: page
I suppose your blueprints cannot be found and therefore the default blueprint is used. Have you made sure that the spelling of both text files and blueprints is exactly the same? Or are there any other text files in the folder?
Yes, @texnixe, those were actually the first things I checked. Just because Iāve made that mistake before lol. Whatās confusing me is that it works locally, then when I move it to staging OR production (two different servers), the same thing happens. Iāve even done a clean upload and the same is happening.
This is the only blueprint that this is happening with.
In my case the issue were old metadata files for languages that I had deactivated. Did you check for metadata for any files or images that shouldnāt be there?
Iāve been slowly going back and implementing this site with a clean-slate. I just now recreated the disappearing fields issue ā by updating to Kirby 2.1.0.
After pushing up that change to my staging server, the blueprint fields disappeared. Only after updating. Anyone have any thoughts as to why this would happen??
Did you try to switch on debugging on your staging server:
c::set('debug', true);
Sounds to me like something is broken. Otherwise feel free to send me the entire site or access to the server via email: support@getkirby.com and I can have a closer look at it.
Just rolled back to a previous commit before upgrading to 2.1.0 and the fields are all back. Forgive me for being ignorant, but how do I use the debugging feature?
I should put that into my config.php file, upgrade to 2.1.0 and then what? Thanks for you help @bastianallgeier!
Thatās actually not how debug works, but itās still helpful It looks like you are missing the error content folder. That might be causing some major issues. Try to fix that first and afterwards try adding the c::set(ādebugā, true); line to site/config/config.php
Ok, did all of thatā¦ checked out the error_log file on my staging server. It spit out some āundefined variableā errors relating to a search field on the site. Removed the offending code, checked error_log again and now thereās nothing new happening.
BUT, the fields are still missing. What else can I do to help you out @bastianallgeier? I really appreciate your time.
The only other thing that comes to mind is some sort of indentation problem like tabs etc. Have you tried to rebuild the blueprint file from scratch? After all it is weired that all other blueprints but this one do work.
I did try rebuilding from scratch. And also just noticed that it is the blueprint for a totally different set of pages as well. So if you look at this site: www.fivepointscolumbia.com
For now, Iām going to have to revert to the previous version of Kirby so my client can have a fully functional panel, but would like to upgrade them at some point so I can take advantage of the improvements. @bastianallgeier if you would like to peek around the files, I can give you access on the server. It is such an odd problem in that, all I did to break the blueprints was to drag over the Kirby and Panel folders from 2.1.0 into the siteās folder. Thatās it.
EDIT: It is absolute magic lol, put Kirby 2.0.5 back in and all the missing fields reappear. Too weird.
I have not @ScottKbkaā¦ just went back to old version for the time being. Needed to have it functional and needed to make some updates. Hoping a solution will surface at some point.
Iām really sorry about the issues. Could you send me the blueprints, which break? support@getkirby.com Iām really not sure whatās going on there.
For me, it was the camel-casing of my blueprint titles that was the culprit.
So I was using ādirectoryPostā and when I changed all of those instances to ādirectory-postā, my problem was solved completely.
I had quite a few blueprints titled this way, so changing them to all lowercase and correcting all references to them allowed me to upgrade without issue.
Well, my blueprints actually work fine with tabs or 4 spaces instead of 2, they just donāt work if the indentation levels are not correct.
Usually, if there is some sort of indentation error, the form is not rendered at all (error message), and sometimes some fields are missing or not rendered correctly.
Anyhow, when something goes wrong with my blueprints, I usually check the following:
indentation
filenames (spelling, best option is to use only lowercase letters)