BoltTranslate / Translate

Provides translation for contenttypes.
Other
43 stars 37 forks source link

[BUG] Cant publish / change status in /bolt/overview/**** #128

Closed melcarthus closed 7 years ago

melcarthus commented 7 years ago

Details

Reproduction

1- I created multiple contentypes (pages). 2- I went to the overview of the contenttype pages and chose select all. 3- I clicked the button publish and nothing happend (the ct's kept their status 'draft' ) 4- I tried to change the status of a single page via the same overview.

Both times nothing happened.

I looked inside the console and found this

VM872:1 Uncaught SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at Object.error (bolt.js:9)
    at l (lib.js:1)
    at Object.fireWith [as rejectWith] (lib.js:1)
    at r (lib.js:1)
    at XMLHttpRequest.<anonymous> (lib.js:1)

I can however publish a page when i'm in /bolt/editcontent/pages/

Contenttypes:

pages:
    name: Pages
    singular_name: Page
    fields:
        locale:
            type: locale
            group: content
        title:
            type: text
            class: large
            is_translateable: true
        slug:
            type: slug
            uses: title
            is_translateable: true
        image:
            type: image
            is_translateable: true
            upload: paginas
        body:
            type: html
            height: 300px
            is_translateable: true
        template:
            type: templateselect
            filter: '*.twig'
        linkedgallery:
            type: select
            values: galleries/name
            label: Galerie
            info: Kies een galerie die getoont moet worden op deze pagina
        dedata:
            type: hidden
        deslug:
            type: locale_data
            index: true
        nldata:
            type: hidden
        nlslug:
            type: locale_data
            index: true
    default_status: publish
    taxonomy: [ groups ]
    recordsperpage: 100

galleries:
    name: Galleries
    singular_name: Gallery
    fields:
        name:
            type: text
            label: Galerie naam
        gallery:
            label: Galerie afbeeldingen
            type: imagelist
            upload: galerie
trips:
    name: Trips
    singular_name: Trip
    fields:
        locale:
            type: locale
            group: content
        featuredimg:
            type: image
            extension: jpg
            attrib: [title, alt]
            upload: zeiltochten
            is_translateable: true
            upload: reizen
        title:
            type: text
            is_translateable: true
        slug:
            type: slug
            uses: title
            is_translateable: true
        teaser:
            type: html
            is_translateable: true
        body:
            type: html
            is_translateable: true
        dedata:
            type: hidden
        deslug:
            type: locale_data
            index: true
        nldata:
            type: hidden
        nlslug:
            type: locale_data
            index: true
    record_template:  trips.twig
    listing_template: listing.twig
    default_status: publish

prices:
    name: Prices
    singular_name: Price
    fields:
        locale:
            type: locale
            group: content
        title:
            type: textarea
            is_translateable: true
            height: 32px
        slug:
            type: slug
            uses: title
            is_translateable: true
        singleprice:
            type: repeater
            fields:
                duration:
                    type: text
                    is_translateable: true
                price:
                    type: text
                    is_translateable: true
        information:
            type: html
            label: informatie
            is_translateable: true
        dedata:
            type: hidden
        deslug:
            type: locale_data
            index: true
        nldata:
            type: hidden
        nlslug:
            type: locale_data
            index: true
    searchable: false
    viesless: false

downloads:
    name: Downloads
    singular_name: Download
    fields:
        locale:
            type: locale
            group: content
        downloaditem:
            type: repeater
            fields:
                name:
                    type: text
                    is_translateable: true
                downloadfile:
                    type: file
                    upload: downloads
                description:
                    type: html
                    label: Beschrijving
                    is_translateable: true
        dedata:
            type: hidden
        deslug:
            type: locale_data
            index: true
        nldata:
            type: hidden
        nlslug:
            type: locale_data
            index: true
    searchable: false
    viesless: true

Translate config

# The locales the site should be available in
locales:
    nl_NL:
        label: Nederlands
        slug: nl
    de_DE:
        label: Deutsch
        slug: de

# Enable/disable automatic routing override.
# Enabling this will prefix all routes with {_locale} which leads to links like
# /en/pages/yourpageslug It is recommended that you leave this on unless you
# want to build your own routing.
routing_override: true

# Enable/disable showing of flag icons next to language names.
show_flags: true

# Enable/disable the menubuilder override.
# Enabling this will make the menu output links in the format of the automatic
# routing. It is recommended that you leave this on unless you want to build
# your own localized menus.
menu_override: true

# Enable/disable the url_generator override.
# Enabling this will override the url generator to make sure that we don't
# generate links without a locale. This is highlig recommended to keep unless
# you also build your own override since it can cause WSOD on 404's otherwise.
url_generator_override: true

# Enable/disable translated slugs.
# Enabling this will use translated slugs instead of using the same slug for
# all languages. Only set to false if you also don't set your slugs to `is_translateable`.
translate_slugs: true

# Enable/disable using Accept-Language header to determine the locale for
# redirection on `/`.
# Enabling this will redirect visitors on `/` to the preferred locale based on
# the Accept-Language header. Disabling this will always redirect `/` to the
# first locale set in `locales` above.
use_accept_language_header: true

# Enable/disable translation of the dashboard.
translate_dashboard: false