@frontity/wp-source returns internal server error

:wave:

I need your help to fix an error of connecting my WordPress site.

Wordpress test website (not launched): https://7turnsfrontity.wordpress.com/
Inside of frontity.settings.js

    {
      name: "@frontity/wp-source",
      state: {
        source: {
          api:
            "https://public-api.wordpress.com/wp/v2/sites/7turnsfrontity.wordpress.com/",
        },
      },
    },

After running npx frontity dev and the terminal says compiled successfully, it returns the following error:

Error: Please set either `state.source.url` (or at least `state.frontity.url` if you are using Embedded mode) in your frontity.settings.js file

And the browser shows “Internal Server Error”. In the network tab, I see that localhost gets 500.

Can someone help me to fix this?
Let me know if you need more info!

Thanks!

Hi @misakimichy

Welcome to the Frontity community.

I’m not able to reproduce the error. With the api setting you specified I can connect to the wordpress.com site.

Have you made any other changes to the code? Could you post your complete frontity.settings.js file please.

I realized that state.frontity.url was blank. Once I added my WordPress URL there, it started working.

Thank you for your time!

2 Likes