Hi,
First of all, I want to thank the Frontity team, building WP websites has become a lot more enjoyable.
Iām running into problems when trying to preview pages. I keep getting Internal Server Error status 500.
My environment is:
ā¢ Frontity project is set inside a folder in the theme folder (itās a monorepo).
ā¢ Iām using Apache to serve both WP and Frontity locally. .htaccess settings added to WP root folder and a simple ProxyPass / http://localhost:3000/ for serving the node server (thereās also a self-signed SSL certificate set on both, so I can run things through https).
ā¢ Frontity is being served at https://dev.prototype.com and WP at https://local.prototype.com
ā¢ Itās a recent project, so I believe all packages are running on their latest versions.
ā¢ Frontity Embedded Mode plugin is installed and $frontity_server is set as āhttps://dev.prototype.comā.
ā¢ āpublic-path https://dev.chaianalytics.com/static when building frontity
Even though the embedded mode seems to be working just fine, I canāt get to make the pages/posts preview posts work. No matter how I set things, I keep getting:
{
status: 500,
statusText: āInternal Server Errorā
}
When debugging the post revision endpoint through Postman, using the same JWT sent as frontity_source_auth, thatās the result I get:
{
ācodeā: āinvalid_usernameā,
āmessageā: āUnknown username. Check again or try your email address.ā,
ādataā: null
}
Apparently, at wp_authenticate_username_password at user.php file in wp-includes the value of $username is {ātypā, which leads to the error above. Curiously, the previews work if I make that function skip errors and return true, but obviously, that canāt go to production.
I thought it could be some issue with my WP REST API not being able to fetch revisions, but the same error doesnāt happen when using Basic Auth on Postman.
Any tips or suggestions are appreciated, let me know if I can provide any more details.
Thanks in advance!