Can't create tailor - SQL Error Unknown column 'nest_depth'

Hi,

I have a page in production mode with caching enabled.

When I create a new record I get an error page and in the logs I see
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘nest_depth’ in ‘field list’ in /…/web/vendor/laravel/framework/src/Illuminate/Database/Connection.php:414

I also gave the tailor a remigrate but it didn’t help, as well as cleared the cachce.

Any idea where the problem might be?

Ver. 3.5.11

Hmm, It looks like you might have a reference to a blueprint that isn’t a structure. Can you share the related blueprints?

uuid: a7561c6e-100f-4346-9181-b4758f2ac09d
handle: Events\ContentEvent
type: stream
name: Events
drafts: false

customMessages:
    buttonCreate: 'New Event'

navigation:
    label: 'list events'
    icon: icon-bookmark
    parent: ContentArticle
    order: 300

fields:

    start_event:
        tab: Content
        label: Start event
        type: datepicker
        mode: date
        span: row
        spanClass: col-2

    end_event:
        tab: Content
        label: End event
        type: datepicker
        mode: date
        span: row
        spanClass: col-2

    category:
        tab: Content
        label: Category
        type: entries
        displayMode: relation
        maxItems: 1
        source: Events\CategoryEvent
        span: row
        spanClass: col-3

    place:
        tab: Content
        label: Place
        type: text

    organizer:
        tab: Content
        label: Organizer
        type: textarea
        span: row
        spanClass: col-6

    attachmens:
        tab: Content
        label: Attachments
        type: fileupload
        mode: file
        maxItems: 10
        span: row
        spanClass: col-6

    contacts:
        tab: Contacts
        label: List of contacts
        type: repeater
        prompt: Add contact
        itemsExpanded: false
        form:
            fields:
                person:
                    label: Full name
                    type: text
                email:
                    label: Email
                    type: email
                phone:
                    label: Phone
                    type: text
                web:
                    label: Www
                    type: text

    content:
        tab: Content
        label: Message
        type: richeditor
        toolbarButtons: paragraphFormat||bold|italic||align||formatOL|formatUL|insertHR||insertLink|insertPageLink||html

    images:
        tab: Images
        label: Images
        type: repeater
        itemsExpanded: false
        prompt: Add Image
        form:
            fields:
                image:
                    label: Image
                    type: mediafinder
                    mode: image
                    maxItems: 1
                    span: row
                    spanClass: col-3

                image_alt:
                    label: Alt text image
                    type: text
                    span: row
                    spanClass: col-3

Thanks. What blueprint type is Events\CategoryEvent?

uuid: 883d31ea-8353-4a1f-bc00-700b9f8fbc0d
handle: Events\CategoryEvent
type: entry
name: Category Events
drafts: false

customMessages:
    buttonCreate: 'New Category'

navigation:
    parent: Events\ContentEvent
    icon: icon-magic
    order: 10

fields:

    description:
        label: Description
        type: textarea
        size: small

Thanks. If you convert this to a structure, migrate it, and then back to an entry again: It will be a workaround. For now, we will change this to a Known Issue.

2 Likes

Thank you, I appreciate your quick response. Problem solved quick fix.

1 Like

Just wanted to report I also had the same problem.

The entry that was failing:

uuid: 736778cb-6d9d-474d-a52d-d264714b227c
handle: Andysh\Website\TechStackItem
type: entry
name: Tech Stack Item
drafts: false

navigation:
    label: Apps/Services
    icon: icon-cube
    parent: Andysh\Website\TechStack
    order: 10

fields:
    body:
        label: Body
        type: richeditor
        tab: Content
        comment: Use this field to describe what this app/service is and what it is used for.
    excerpt:
        label: Excerpt
        type: richeditor
        tab: Content
        comment: A shortened version of the Body that appears on listing pages.
    is_favourite:
        label: Favourite?
        type: checkbox
        tab: Content
        comment: Highlight this as a favourite item (will be displayed first.)
    referral_url:
        label: Referral URL
        type: text
        tab: Referral
        comment: URL to allow users to sign up or purchase.
    referral_button_text:
        label: Referral Button Text
        type: dropdown
        tab: Referral
        comment: Text to display to users.
        options:
            buy: Buy
            purchase: Purchase
            register: Register
            signup: Sign-up
    logo_info:
        label: Logo
        type: mixin
        source: Andysh\Website\ImageInfo
        tab: Media
    supplier:
        label: Supplier/Provider
        type: entries
        source: Andysh\Website\TechStackSupplier
        displayMode: recordfinder
        maxItems: 1
        tab: Relations
    categories:
        label: Categories
        type: entries
        source: Andysh\Website\TechStackCategory
        tab: Relations

I used a process of elimination to determine it was the “categories” field causing the problem. After a Google of the error brought me to this thread, I changed the “Andysh\Website\TechStackCategory” blueprint to a structure, migrated, then back to an entry, and this worked.

Before I did this, it also fixed the problem if I added:

displayMode: recordfinder
maxItems: 1

to the “categories” field - but obviously the recordfinder only allows 1 relation to be linked, so wasn’t a solution for me.

encountering the same issue suddently on an existing Tailor setup.

the faultive is the form field which is entries, changing it to Structure does not solve the issue here.

uuid: 912c5956-878d-11ed-9699-df30dbea9de3
handle: Content\Forms\Submissions
type: stream
name: Submissions
drafts: false
multisite: false
pagefinder: false

navigation:
  icon: icon-inbox
  parent: Content\Forms
  order: 12

customMessages:
  buttonCreate: New Submission

fields:
  form:
    type: entries
    source: Content\Forms
    label: Submissions From
    commentAbove: The form that this data came from.
    displayMode: recordFinder
    maxItems: 1
    disabled: true
  data:
    type: textarea
    label: Submission Data
    disabled: true
    column:
      type: summary
      label: Submission Data
  files:
    type: fileupload
    label: Files
    disabled: true
    column:
      type: image
      label: Files

Hi Chris,

You need to change the type of the related blue print (in your case Content\Forms) not the one that’s throwing the error.

I’m guessing that is something like “type: entry” right now - change that to “type: structure” and re-migrate it, then back again.

Hi @andysh_uk , got it,
I change the stream to structure on the related blueprint and it works fine now.
thanks

A patch was included to fix this in v3.5.12

1 Like