Hi guys!
Can anyone tell me why when I try to access on homepage in frontity project i receive this?
errorStatus: 404
errorStatusText: "You have tried to access content at route: / but it does not exist"
is404: true
isError: true
isFetching: false
isReady: true
link: "/"
This is a piece of my frontity.settings.js where i set homepage and postsPage:
…
{
name: '@frontity/wp-source',
state: {
source: {
url: wordpress url,
homepage: '/homepage',
postsPage: '/homepage-2',
},
},
…
And this is the configuration in wordpress admin dashboard:
Other page are ok, this is an example:
id: 76
isFetching: false
isPage: true
isPostType: true
isReady: true
link: "/wordpress/about-us/"
page: 1
Thanks for your help!
What happens if you add a trailing slash?
/homepage/
Hi @codemonkeynorth
Same problem.
In the url I still have /wordpress (to fix before release) and I don’t want that to be the problem I reach each page from /wordpress/pageName now, but in the future it will be only /pageName. But I don’t understand why i have no problem with others go down except the one I put as home. If from the wordpress settings I set another hompage, I still go wrong.
In state.source.url
I have siteName.com :portNumber/wordpress/ (portNumber is present to have in siteName.com the frontity project and in siteName.com :portNumber the wordpress installation)
Try it like this and see if that works (from another discussion)
// Other props/packages were removed to simplify the code.
const settings = {
name: "codesandbox-frontity",
state: {
frontity: {
// The `/wordpress` subdirectory should be included in the Frontity URL.
url: "http://sitename.com/wordpress",
}
},
packages: [
{
name: "@frontity/wp-source",
state: {
source: {
url: "http://sitename.com/wordpress",
subdirectory: "/wordpress",
homepage: "homepage"
}
}
}
]
};
export default settings;
it works! thank you!
Can you send me the link of that discussion?
Other little question: is there any way to change the initial link of frontity?
Ignore the WPML problem as it doesn’t affect you
opened 09:31PM - 27 May 21 UTC
closed 10:52AM - 12 Jul 21 UTC
awaiting-triage
**_Bug report_**
I needed to update all my packages to be able to use the `yo… ast` plugin. I have a multilanguage site using WPML in the backend. After updating frontity does not recognize my homepage anymore and returns a 404 page. Might be related to #806
**Expected behavior**
I'm expecting it to return the homepage.
**Observed behavior**
A 404 page is returned.
**Steps involved to reproduce the problem**
You can pull the SEO branch over here. https://github.com/TiborUdvari/gama-website/tree/seo
The main branch has a running deployment here: https://gama-am.ch/fr/
You can consult it to see how the language routing works.
**Info about your system**
```
## System:
- OS: macOS 11.1
- CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
- Memory: 202.33 MB / 32.00 GB
- Shell: 5.8 - /bin/zsh
## Binaries:
- Node: 12.18.2 - /usr/local/bin/node
- npm: 6.14.10 - /usr/local/bin/npm
## Browsers:
- Chrome: 90.0.4430.212
- Edge: Not Found
- Firefox: 84.0.1
- Safari: 14.0.2
## npmPackages:
- @frontity/components: ^1.7.3 => 1.7.3
- @frontity/core: ^1.14.1 => 1.14.1
- @frontity/html2react: ^1.7.0 => 1.7.0
- @frontity/tiny-router: ^1.4.2 => 1.4.2
- @frontity/wp-source: ^1.11.5 => 1.11.5
- @frontity/yoast: ^2.1.1 => 2.1.1
- @n8tb1t/use-scroll-position: ^2.0.3 => 2.0.3
- @nivo/bar: ^0.70.1 => 0.70.1
- @nivo/core: ^0.70.1 => 0.70.1
- @nivo/scatterplot: ^0.70.1 => 0.70.1
- @theme-ui/color: ^0.9.1 => 0.9.1
- @theme-ui/components: ^0.9.1 => 0.9.1
- @theme-ui/match-media: ^0.9.1 => 0.9.1
- @theme-ui/presets: ^0.9.1 => 0.9.1
- axios: ^0.21.1 => 0.21.1
- dotenv-webpack: ^7.0.2 => 7.0.2
- framer-motion: ^4.1.17 => 4.1.17
- frontity: ^1.16.0 => 1.16.0
- frontity-starter-theme: ./packages/frontity-starter-theme => 1.0.0
- hex-to-rgba: ^2.0.1 => 2.0.1
- highcharts: ^9.1.0 => 9.1.0
- highcharts-react-official: ^3.0.0 => 3.0.0
- i18next: ^20.3.0 => 20.3.0
- i18next-browser-languagedetector: ^6.1.1 => 6.1.1
- i18next-http-backend: ^1.2.6 => 1.2.6
- lodash: ^4.17.21 => 4.17.21
- luxon: ^1.27.0 => 1.27.0
- masonic: ^3.4.1 => 3.4.1
- nanoid: ^3.1.23 => 3.1.23
- navbar-demo: 0.0.1
- polished: ^4.1.2 => 4.1.2 (3.7.1)
- react-cookie: ^4.0.3 => 4.0.3
- react-error-boundary: ^3.1.3 => 3.1.3
- react-ga: ^3.3.0 => 3.3.0
- react-headroom: ^3.1.1 => 3.1.1
- react-helmet-async: ^1.0.9 => 1.0.9
- react-hook-form: ^7.6.8 => 7.6.8
- react-html-parser: ^2.0.2 => 2.0.2
- react-html-parser-demo: 0.0.0
- react-i18next: ^11.9.0 => 11.9.0
- react-lottie: ^1.2.3 => 1.2.3
- react-move: ^6.4.0 => 6.4.0
- react-papaparse: ^3.14.0 => 3.14.0
- react-scroll: ^1.8.2 => 1.8.2
- react-share: ^4.4.0 => 4.4.0
- react-slugify: ^2.0.3 => 2.0.3
- react-swipeable-views: ^0.13.9 => 0.13.9
- react-table: ^7.7.0 => 7.7.0
- recaptcha-v3: ^1.9.1 => 1.9.1
- styled-components: ^5.3.0 => 5.3.0
- styled-components/macro: undefined ()
- styled-components/native: undefined ()
- styled-components/primitives: undefined ()
- theme-ui: ^0.9.1 => 0.9.1
- url-parse: ^1.5.1 => 1.5.1
## npmGlobalPackages:
- frontity: Not Found
- npx: Not Found
```
**Possible solution**
Any quick hacks are welcome. I need to get it working again so I can finish this project.
1 Like