Missing Panel Fields

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.

This happened to me before: Help! Empty page for one language :( Rest works fine

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!

Nevermind, think I figured it out. So I visit mystagingserver.com/debug and see what it says, correct?

Hereā€™s what I got:

Fatal error: Call to a member function isErrorPage() on a non-object in /home/joslemmo/public_html/staging/kirby/kirby.php on line 359

Same result on the live website as well, fwiw.

Thatā€™s actually not how debug works, but itā€™s still helpful :slight_smile: 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

It is the blueprint for these interviews:

http://fivepointscolumbia.com/listography/sara-thomas

And also for these individual business pages (used in three separate sections):

http://fivepointscolumbia.com/restaurants/andys-deli

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.

@joslemmons, @bastianallgeier did you find a solution to this? I think Iā€™m having a similar problem: panel not laoding blueprints

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.

Same Problem here. Reverting to 2.0.6 solves the problem.

Did you check that you only use exact two spaces for each level of indentation and NO tabs?

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.

See here: Panel not loading Blueprints

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)
  • use of field types and settings
  • stray text files
1 Like

Since the blueprints are working locally syntax seems to be correct. The problems only occur on the remote server.