Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Headless > Live Preview not working for REST API #5609

Closed
bryantgillespie opened this issue Mar 22, 2022 · 4 comments · Fixed by #5623
Closed

Headless > Live Preview not working for REST API #5609

bryantgillespie opened this issue Mar 22, 2022 · 4 comments · Fixed by #5623

Comments

@bryantgillespie
Copy link

Bug description

Description

I've got a Nuxt 2.X site that I'm trying to convert over to use Statamic as a headless CMS.

Live preview is not working for the REST API. It sends the same response even if you pass the token back to the API.

Graph QL appears to work correctly.

Screenshots

GraphQL
ScreenShot 2022-03-22 at 17 36 49@2x

Rest
ScreenShot 2022-03-22 at 17 35 51@2x

How to reproduce

When you pass the token sent to the live preview target using the REST API you still get the same response from the API.

Logs

No response

Versions

Statamic 3.3.2 Pro
Laravel 9.5.1
PHP 8.0.15

Installation

Starter Kit using via CLI

Antlers Parser

No response

Additional details

No response

@duncanmcclean
Copy link
Member

I wonder if the live preview response is being cached - I think there was a similar problem with GraphQL during the beta. (could be wrong)

@bryantgillespie
Copy link
Author

bryantgillespie commented Mar 23, 2022

I wonder if the live preview response is being cached - I think there was a similar problem with GraphQL during the beta. (could be wrong)

I had looked at that as well because my first thought was user error. But all the tests I tried were with the cache set to false within the api.php config.

ScreenShot 2022-03-22 at 22 20 33@2x

@jasonvarga
Copy link
Member

Bizarre, I was so sure I added it to the REST API in that initial PR, but I see no trace of it.

@bryantgillespie
Copy link
Author

You're too fast man 🤣
Thanks for getting this knocked out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants