Frontity not working with plain permalinks

I’ve set up a new Frontity site and changed state.source.api in frontity.settings.js to point to my WordPress site.

When I load the Frontity site (currently at localhost:3000) I get the following error displayed:

Internal Server Error

When I change it back to the default demo source ( everything works fine again.

Compilation succeeds but I also get this error in the terminal when attempting to load the page in the browser:

FetchError: invalid json response body at http://wptest.test/wp-json/wp/v2/posts/?_embed=true&page=1 reason: Unexpected token < in JSON at position 0

OK, figured it out.

I had permalinks set to ‘Plain’ in WordPress. When I changed permalinks to any other setting, e.g. ‘Post name’ then my Frontity site displayed fine.

1 Like

You’re right @zyriab, right now wp-source only works with pretty permalinks. Totally our fault, that should be stated in our docs.

I’m going to add it to the docs todo list :slight_smile:

@community-team I am going to rename this topic from “Internal server error” to “Frontity not working with plain permalinks”.

I think renaming topics is a good practice. It will help Google to index this page and people to find it.

Feel free to edit this or any other topic :slight_smile:

I’ve received this additional info from @luisherranz:

Yes, because of two reasons:

So wp-source needs permalinks right now but that can be solved in the future if users ask for it, although as far as I know nobody has requested that so far.

1 Like