2016-11-24 69 views
0

我不能更新或創建新的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: &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(和更改連字符下劃線):

在contentType中的 '關於' 中,對關係」 -fr'被定義,這不是有效的ContentType。請編輯contenttypes.yml,並更正此問題。

回答

0

這是由於內容類型名稱中的下劃線。這是Bolt 3.0和3.1中的一個錯誤。更新到3.2,它會工作。

+0

我更新到3.2.2,並且出現此錯誤(我將所有連字符更改爲下劃線)'在'Footer'的ContentType中,定義了'footer-fr'關係,這不是有效的ContentType。請編輯contenttypes.yml並更正此問題。「我在我的問題中添加了我的contenttype代碼。 –

相關問題