Multilinguale in Ghost 3

We have an Small Ghost base on self hosted docker environment which runs great
(3.14) but by following the official and (https://matou.de/multi-language-ghost-posts/ ) info it doesn’t work
it seems that it doesn’t like the filters our route is routes:

collections:
/:
permalink: /{slug}/
template: index
filter: ‘tag:-hash-en’

/en/:
permalink: /en/{slug}/
template: index-en
filter: ‘tag:hash-en’

taxonomies:
tag: /tag/{slug}/
author: /author/{slug}/

And the error file says
“code”:null,
“name”:“BadRequestError”,
“statusCode”:400,
“level”:“normal”,
“message”:“Error parsing filter”,
“stack”:“BadRequestError: Error parsing filter\n at new BadRequestError (/var/lib/ghost/versions/3.14.0/node_modules/ghost-ignition/lib/errors/index.js:113:23)\n at Child.applyDefaultAndCustomFilters (/var/lib/ghost/v
ersions/3.14.0/core/server/models/plugins/filter.js:90:23)\n at Function.findPage (/var/lib/ghost/versions/3.14.0/core/server/models/base/index.js:883:24)\n at Object.query (/var/lib/ghost/versions/3.14.0/core/server/api/cana
ry/posts-public.js:32:32)\n at Object.query (/var/lib/ghost/versions/3.14.0/core/server/api/shared/pipeline.js:156:24)\n at /var/lib/ghost/versions/3.14.0/core/server/api/shared/pipeline.js:241:35\n at tryCatcher (/var/lib
/ghost/versions/3.14.0/node_modules/bluebird/js/release/util.js:16:23)\n at Promise._settlePromiseFromHandler (/var/lib/ghost/versions/3.14.0/node_modules/bluebird/js/release/promise.js:547:31)\n at Promise._settlePromise (/v
ar/lib/ghost/versions/3.14.0/node_modules/bluebird/js/release/promise.js:604:18)\n at Promise._settlePromise0 (/var/lib/ghost/versions/3.14.0/node_modules/bluebird/js/release/promise.js:649:10)\n at Promise._settlePromises (/
var/lib/ghost/versions/3.14.0/node_modules/bluebird/js/release/promise.js:729:18)\n at _drainQueueStep (/var/lib/ghost/versions/3.14.0/node_modules/bluebird/js/release/async.js:93:12)\n at _drainQueue (/var/lib/ghost/versions
/3.14.0/node_modules/bluebird/js/release/async.js:86:9)\n at Async._drainQueues (/var/lib/ghost/versions/3.14.0/node_modules/bluebird/js/release/async.js:102:5)\n at Immediate.Async.drainQueues [as _onImmediate] (/var/lib/gho
st/versions/3.14.0/node_modules/bluebird/js/release/async.js:15:14)\n at processImmediate (internal/timers.js:456:21)\n at process.topLevelDomainCallback (domain.js:137:15)\n\nError: Query Error: unexpected character in filte
r at char 7\n(tags:+id:-5ebaa51589fed8\n-------^\nExpecting ‘NULL’, ‘TRUE’, ‘FALSE’, ‘NUMBER’, ‘LITERAL’, ‘STRING’, got ‘RBRACKET’\n at Parser.parser.parseError (/var/lib/ghost/versions/3.14.0/node_modules/@nexes/nql-lang/dist
/parser.js:328:12)\n at Parser.parse (/var/lib/ghost/versions/3.14.0/node_modules/@nexes/nql-lang/dist/parser.js:245:22)\n at Object.exports.parse (/var/lib/ghost/versions/3.14.0/node_modules/@nexes/nql-lang/lib/nql.js:18:44)
\n at Object.api.parse (/var/lib/ghost/versions/3.14.0/node_modules/@nexes/nql/lib/nql.js:15:31)\n at Object.api.querySQL (/var/lib/ghost/versions/3.14.0/node_modules/@nexes/nql/lib/nql.js:49:44)\n at Builder. (
/var/lib/ghost/versions/3.14.0/core/server/models/plugins/filter.js:87:24)\n at Object.query (/var/lib/ghost/versions/3.14.0/node_modules/bookshelf/lib/helpers.js:57:14)\n at Child.query (/var/lib/ghost/versions/3.14.0/node_m
odules/bookshelf/lib/model.js:1256:22)\n at Child.applyDefaultAndCustomFilters (/var/lib/ghost/versions/3.14.0/core/server/models/plugins/filter.js:80:22)\n at Function.findPage (/var/lib/ghost/versions/3.14.0/core/server/mod
els/base/index.js:883:24)\n at Object.query (/var/lib/ghost/versions/3.14.0/core/server/api/canary/posts-public.js:32:32)\n at Object.query (/var/lib/ghost/versions/3.14.0/core/server/api/shared/pipeline.js:156:24)\n at /v
ar/lib/ghost/versions/3.14.0/core/server/api/shared/pipeline.js:241:35\n at tryCatcher (/var/lib/ghost/versions/3.14.0/node_modules/bluebird/js/release/util.js:16:23)\n at Promise._settlePromiseFromHandler (/var/lib/ghost/ver
sions/3.14.0/node_modules/bluebird/js/release/promise.js:547:31)\n at Promise._settlePromise (/var/lib/ghost/versions/3.14.0/node_modules/bluebird/js/release/promise.js:604:18)\n at Promise._settlePromise0 (/var/lib/ghost/ver
sions/3.14.0/node_modules/bluebird/js/release/promise.js:649:10)\n at Promise._settlePromises (/var/lib/ghost/versions/3.14.0/node_modules/bluebird/js/release/promise.js:729:18)\n at _drainQueueStep (/var/lib/ghost/versions/3
.14.0/node_modules/bluebird/js/release/async.js:93:12)\n at _drainQueue (/var/lib/ghost/versions/3.14.0/node_modules/bluebird/js/release/async.js:86:9)\n at Async._drainQueues (/var/lib/ghost/versions/3.14.0/node_modules/blue
bird/js/release/async.js:102:5)\n at Immediate.Async.drainQueues [as _onImmediate] (/var/lib/ghost/versions/3.14.0/node_modules/bluebird/js/release/async.js:15:14)\n at processImmediate (internal/timers.js:456:21)\n at pro
cess.topLevelDomainCallback (domain.js:137:15)”
},
“msg”:“Error parsing filter”,
“time”:“2020-05-18T01:42:24.273Z”,

But what exactly is wrong ?
thx for an hint

You might benefit from following our tutorial which provides a bit more detail on how you’re meant to handle templates in Ghost with multiple languages:
https://ghost.org/tutorials/multi-language-content/

Hope this helps!

Hello David thank you for that quick answer but i exactly followed that tutorial and it simply doesn’t work !
i dont know how to tackle the “sg”:“Error parsing filter”,” which seems to be the issue
It maybe that 3.14 needs something then 2.x
that is why i wrote that message here in that forum
so if anybody had similar experience any hint would help

The filter error either relates to the filter in the routes file, or the filter in your Handlebars theme. I’ve formatted your routes file below. Is this how it currently looks?

routes:

collections:
  /:
    permalink: /{slug}/
    template: index
    filter: tag:-hash-en
  /en/:
    permalink: /en/{slug}/
    template: index-en
    filter: tag:hash-en

taxonomies:
  tag: /tag/{slug}/
  author: /author/{slug}/

thank you so much
yes it is a copy of my file
i bought ease and now i tried libeling to be sure and same effect on both designs so i would rule out handlebar ,…

I’m not sure why this would be happening. The format of the routes definition I placed in the post above should be fine. Could you check the syntax and formatting of your routes file matches mine?

Thank you for your help the Now it works
Please review your example which i was following it says " ```
routes:

collections:
/:
permalink: /{slug}/
template: index
filter: ‘tag:-hash-de’
/de/:
permalink: /de/{slug}/
template: index-de
filter: ‘tag:hash-de’

taxonomies:
tag: /tag/{slug}/
author: /author/{slug}/

but it should say because of the single hypen !!! 
thx thousand times 
routes:

collections:
  /:
    permalink: /{slug}/
    template: index
    filter: tag:-hash-de
  /de/:
    permalink: /de/{slug}/
    template: index-de
    filter: tag:hash-de

taxonomies:
  tag: /tag/{slug}/
  author: /author/{slug}/
1 Like

We where working on our app very hard so we now have time to change the language thing
Problem ist still there the filtering doesn’t work !!!
It is really strange when you go to our site and hit Material https://make3d.biz/tag/material/ it also shows english text (we now added EN to see it soon) we now tried everything for filtering simply doesn’t work
the route at EN works but then there eis no filter so all posts are shown it only filters the slug tag ,… so it seems there is no possibility to filter a 2nd field and out hash tags we are now stuck if anyone has an hint or managed 2 language to work thus would help or an way how we can test filtering
we now have 3 ways a) forget about english and doing all in german translate.google.com is your friend b) Learn handlebar and hardcode the filter c) use ghost as input for Gatsby maybe someone has an better idea thx thomas

I’m afraid that link just errors for me. It sounds like to me that you’re tagging multiple language articles with the same tag. Surely if you are tagging posts you should tag them in their own translated tags? The alternative is to prefix those tags, which would produce a similar result. I think you need to look into making your tags more exclusive to their own languages, rather than trying to translate the single tag.

Hi,
unfortunately we had server problems yesterday so new Server gets installed today hopefully we are back tomorrow ,…

Hi Server is recovered the app needs some more time ,…