Hyphens added when page saved

Hi,

I’m experiencing a very strange issue when trying to save changes to my pages.

If I try edit any of my resident pages and then click save, when I refresh the page the page title has been hyphenated. Any ideas why this may be? This doesn’t happen on any other page types.

See video for detail:

Could you please post your blueprint for this page type?

title: Resident

pages: false

fields:
  title:
    label: Name
    type: title
    required: false

  autopublish:
    label: Autopublish on
    type: date
    time: true
    default: now

  aboutimage:
    label: Photo
    type: info
    text: >
      Use the left-hand panel to upload images to the resident's page.
      Select which image you want to use by using the "Choose photo" section below.
      You can upload multiple photos per resident, but only the one selected below is publicly visible.

  files:
    label: Choose photo
    type: files
    required: false

  residenttime:
    label: Resident's show time
    type: text
    required: false

  location:
    label: Resident's location e.g. "Bristol" or "Tokyo"
    type: text
    required: false

  text:
    label: About
    type: textarea
    required: false

  aboutmixcloud:
    label: About Mixcloud link
    type: info
    text: >
      Please provide Mixcloud link in a format that links directly to the resident's archive on the Noods Mixcloud profile. Example: https://www.mixcloud.com/NoodsRadio/playlists/residentnamehere

  mixcloud:
    label: Mixcloud link
    type: url

  tags:
    label: Tags
    type: tags

  aboutsociallinks:
    label: About social links
    type: info
    text: >
      Provide links to the artists Facebook, Twitter, Soundcloud and Bandcamp here. Please use the full URL!

  facebook:
    label: Facebook link
    type: url

  twitter:
    label: Twitter link
    type: url

  instagram:
    label: Instagram link
    type: url

  soundcloud:
    label: Soundcloud link
    type: url

  bandcamp:
    label: Bandcamp link
    type: url

  similarresidents:
    label: Similar Residents
    type: multiselect
    max: 16
    options: query
    query: site.find('residents').children

Ah, it’s what I thought: you are using a field called title. That’s not possible because the title field is reserved for the title and must not be used inside your blueprint. Please remove it or rename it to something else if you need a subtitle field or whatever.

1 Like

Thank you! Will do

Hi Texnixe,

Just looking again at this issue.

How would you advise that I go about changing the field name, while still retaining the non-hyphenated version as the page Title?

What exactly is your purpose of having the title field?

Thing is, the title is the stuff you add when you create a new page in the page creation dialog and that is then shown in the top right of the page form. This is saved to the content file as title field and must not be defined in the blueprint.

So all fields you add to your blueprint must have other keys, e.g subtitle, menutitle, text or whatever you come up with.

I don’t have to retain the title filed name as such. It’s just the whole site of my than 350 entries all use the Title field as reference when sorting shows and outputting them on the front end. Is the title field always something that is hyphenated in Kirby 3? Is it auto populated by Kirby and not meant to be changed by admin?

No, the title is not hyphenated, only when you have a title field in your content. Because then Kirby get’s irritated and falls back to using the slug, which is usually the hyphenated title.

When you remove the title field from the blueprint, the title will still be there. Check it out. Make a copy of your content folder as a backup, then remove the title field from the blueprint.

You will still have a title, it will still be in the content folder and it will be shown non-hyphenated in the Panel.

Okay so I removed the Title altogether. I now get the folder name which includes the shows name and date? Whereas the original show name was the non-hyphenated name of show without the date.

But now it looks as if you don’t have a title field in the content file anymore, which is weird. The title is a required field, it is automatically added to the content file by Kirby when the page is created.

So, in the end there should be a title in your content file, only it should not be defined in the blueprint. Or are you overriding what Kirby does?

Would the fact that these shows are pre-existing be causing issues? As I’m only removing the title and title field from the blueprint. I’m not then resaving them with a different name…

So the shows don’t have a title field in the content .txt files? I’m somehow at a loss.

Apologies. I deleted the Title fields from the each Resident txt file as well as removing the field. restoring them and just removing the field in the blueprint did the trick.

Thank you Texnixe!