Illegal string Offset in my Structurefield

Hi everybody,
so I added a structure table to my template in Kirby, where I want to insert links and names for the links. On my website I just want to show a certain name instead of the link, which you can type in my table as well.

so this is how my blueprint looks like

links:
    label: Nur für die Links
    type:  structure
    style: table
    entry: >
      {{linkName}}
      {{link}}
    fields:
      linkName:
        label: Titel
        type: text
      link:
        label: Links
        type: url

and this is my foreach loop

when i look on my website, it does get the actual link, but not the linkName. It gives the message ‘Illegal string offset’linkName’…’

Does anybody has an idea to solve this or know what I did wrong ?

advanced thanks a lot

Try the lowercased variant in your template: linkname.

Also, the entry blueprint option is currently not compatible with the table style, so it currently won’t do anything. But that’s unrelated to your issue.

thaanks it works now :slightly_smiling:

hey, it is me again :confounded: somehow it didn’t work properly, just in the one project, the other one show that Error message

Could you please post the full blueprint for that template and the current content file contents of the current page?

I have the same problem. Here is my blueprint.

<?php if(!defined('KIRBY')) exit ?>

title: Portfolio
pages: false
files: false
fields:
  title:
    label: Title
    type:  text
  subtitle:
    label: Subtitle
    type:  text
  related:
    label: Related Pages
    type: structure
    entry: {{page}}
    fields:
      page:
        label: Page
        type: page
  text:
    label: Text
    type:  textarea

And the content is currently:

Title: Test

----

Subtitle: Cyborgs

----

Text: Blah.

----

Related: port

Woah. The weirdest thing ever just happened. I randomly discovered that you can click and drag the bold text in those warning messages like you see in Mia’s screenshot. You can grab the Warning and the file/path/to/stuff and the line number. So I was idly dragging them a short distance and letting go and they would snap back. Then I dragged on of the line numbers all the way underneath the spot where the list of entries should be (like underneath the table in Mia’s screenshot), and then THE PROBLEM DISAPPEARED! The page works now!

?!?!?!

I’m going to go to bed now and see if this is still real when I wake up in the morning…

The output in the text file does not look like a structure field entry, which in your case should look similar to this:

Related: 

- 
  page: projects/project-b

So something must have gone wrong.

What is the result now that the error has disappeared?

Yeah, well I think that the messed up txt file is because I was trying to save the page in the Kirby panel and it wasn’t working. Originally and eventually it looked like you said with the related pages separated by -.

By the way, I am generating pages with a script to transfer an old site into Kirby, but since the bizarre incident I described I haven’t had these errors anymore.