执行时发生异常...一般错误:1 接近 "as":语法错误 Bolt CMS



我无法更新或创建新的ContentType'页脚'我在Bolt 3.0.11上有此错误:

An exception occurred while executing 'SELECT id, as title FROM bolt_footer_fr footer_fr ORDER BY id ASC': SQLSTATE[HY000]: General error: 1 near "as": syntax error

如何更新ContentType页脚?

我使用sqllite。

这里我所有的contentType

home_en:
    name: Home
    singular_name: Home
    fields: &home  
        title: 
            type: text
            label: Title
            group: header
        name:
            type: text
            label: Name of the site
            group: header
        profession:
            type: html
            label: Name and profession
            group: header
        telephone:
            type: html
            label: Telephone
            group: header
        image:
            type: image
            label: Image of the header
            group: header
        text:
            type: html
            label: Text on header image
        slug:
            type: slug
            use: title
    relations:
        home_fr:
            multiple: false
            label: Select a record
            order: -id        
    icon_one: "fa:home"
    icon_many: "fa:home"
    record_template: index.twig
home_fr:
    name: Accueil
    singular_name: Accueil
    fields: *home
    icon_one: "fa-home"
    icon_many: "fa:home"
    relations:
        home_en:
            multiple: false
            label: Select a record
            order: -id
    record_template: index.twig        
section_en:
    name: Section home
    singular_name: Section home
    fields: &sectionHome
        title:
            type: text
            label: Section title
        text:
            type: html
            label: Text 
        slug:
            type: slug
            uses: title   
    taxonomy: [ order ]        
    relations:
        section_fr:
            multiple: false
            label: Select a record
            order: -id      
section_fr:
    name: Section accueil
    singular_name: Section accueil
    fields: *sectionHome    
    taxonomy: [ order ]
    relations:
        section_en:
            multiple: false
            label: Select a record
            order: -id    
about_en:
    name: About
    singular_name: About
    fields: &about
        slug:
            type: slug
            use: title
        title:
            type: text
            label: Title
        image:
            type: image
            label: image of you
        text:
            type: html
            label: text   
    icon_one: "fa:user"
    icon_may: "fa:user"   
    record_template: record.twig
    relations:
        about_fr:
            multiple: false
            label: Select a record
            order: -id  
about_fr:
    name: Qui suis-je
    singular_name: Qui suis-je
    fields: *about
    icon_one: "fa:user"
    icon_may: "fa:user"
    record_template: record.twig
    relations:
        about_en:
            multiple: false
            label: Select a record
            order: -id  
contact_en:
    name: Contact en
    singular_name: contact en
    fields: &contact
        slug:
            type: slug
            use: title
        title:
            type: text
            label: title
        contact_info:
            type: html
            label: Contact informations
        slug:
            type: slug
            uses: name 
        name:
            type: text
            readonly: true
            default: "contact"  
        map:
            type: geolocation
            label: Map
    icon_one: "fa:envelope"
    icon_many: "fa:envelope"
    record_template: record.twig
    relations:
        contact_fr:
            multiple: false
            label: Select a record
            order: -id  
contact_fr:
    name: Contact fr
    singular_name: contact fr
    fields: *contact
    icon_one: "fa:envelope"
    icon_many: "fa:envelope" 
    record_template: record.twig
    relations:
        contact_en:
            multiple: false
            label: Select a record
            order: -id
footer_en:
    name: Footer
    singular_name: Footer
    fields: &footer
        copyright:
            type: html
            label: Copyright
        social_media:
            type: html
            label: Social media
    relations:
        footer_fr:
            multiple: false
            label: Select a record
            order: -id               
footer_fr:
    name: Pied de page
    singular_name: Pied de page
    fields: *footer
    relations:
        footer_en:
            multiple: false
            label: Select a record
            order: -id

我在更新为3.2.2时有此错误(并将连字符更改为下划线):

在``aid over'',关系'of-fr'的内容类型中定义了,这不是有效的contentType。请编辑contentTypes.yml,然后更改此。

这是由于ContentType名称中的下划线。这是Bolt 3.0和3.1中的错误。更新为3.2,它将起作用。

相关内容

最新更新