Hello! I’m facing the same problem here.
I’m trying to make a test site (testing up frontity ) and I want to add multilanguage. I’m using WPML plugin and I setted up /es/ for spanish and /en/ for english.
The problem is the homepage is resolving a 404. Posts and other pages are showing correctly. Also my localhost domain without the /es or /en is giving an error:
Internal Server Error
TypeError: Cannot read property 'split' of undefined at __webpack_exports__.default (webpack-internal:///./node_modules/@frontity/wp-source/src/libraries/handlers/utils/capitalize.ts:2:73) at Object.eval (webpack-internal:///./node_modules/@frontity/wp-source/src/libraries/handlers/postType.ts:10:205) at runMicrotasks (<anonymous>) at processTicksAndRejections (internal/process/task_queues.js:97:5) at eval (webpack-internal:///./node_modules/@frontity/wp-source/src/actions.ts:18:101)
Here is my frontify.settings.js
const settings = [
"name": "Spanish-es",
"match": [".*localhost:3000\/es(\/.*)?$"],
"state": {
"frontity": {
"url": "",
"title": "Test Frontity Blog",
"description": "WordPress installation for Frontity development"
}
},
"packages": [
{
"name": "@frontity/mars-theme",
"state": {
"lang": "es",
"theme": {
"menu": [
[
"Home",
"/es/"
],
[
"Sobre nosotros",
"/es/sobre-nosotros/"
],
[
"Blog",
"/es/blog/"
],
[
"English",
"/en/"
]
],
"featured": {
"showOnList": false,
"showOnPost": false
}
}
}
},
{
"name": "@frontity/wp-source",
"state": {
"source": {
"api": "",
"homepage": "/es/inicio",
"postsPage": "/es/blog",
"params": {
"lang": "es",
}
}
}
},
"@frontity/tiny-router",
"@frontity/html2react"
]
},
{
"name": "English",
"match": [".*localhost:3000\/en(\/.*)?$"],
"state": {
"frontity": {
"url": "",
"title": "Test Frontity Blog",
"description": "WordPress installation for Frontity development"
}
},
"packages": [
{
"name": "@frontity/mars-theme",
"state": {
"lang": "en",
"theme": {
"menu": [
[
"Home",
"/en"
],
[
"About us",
"/en/about-us/"
],
[
"Blog",
"/en/blog/"
],
[
"Spanish",
"/es/"
]
],
"featured": {
"showOnList": false,
"showOnPost": false
}
}
}
},
{
"name": "@frontity/wp-source",
"state": {
"source": {
"api": "",
"homepage": "/en/homepage",
"postsPage": "/en/blog",
"params": {
"lang": "en",
}
}
}
},
"@frontity/tiny-router",
"@frontity/html2react"
]
}
]
export default settings;
Any idea how to make homepage visible and the path “/” redirecting to /es or /en?