异常而执行...常规错误:1近“为”:语法错误博尔特CMS
问题描述:
我不能更新或创建新的contentType“页脚”我对博尔特3.0.11此错误:异常而执行...常规错误:1近“为”:语法错误博尔特CMS
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: §ionHome
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(和更改连字符下划线):
在contentType中的 '关于' 中,对关系” -fr'被定义,这不是有效的ContentType。请编辑contenttypes.yml,并更正此问题。
答
这是由于内容类型名称中的下划线。这是Bolt 3.0和3.1中的一个错误。更新到3.2,它会工作。
我更新到3.2.2,并且出现此错误(我将所有连字符更改为下划线)'在'Footer'的ContentType中,定义了'footer-fr'关系,这不是有效的ContentType。请编辑contenttypes.yml并更正此问题。“我在我的问题中添加了我的contenttype代码。 –