prismicio-community / php-kit

Community maintained development kit for Prismic and the PHP language
https://prismic.io
Other
108 stars 82 forks source link

Trying to get urlencoded URL during preview #110

Closed tremby closed 1 year ago

tremby commented 9 years ago

I had a pair of exceptions logged today when our client tried to preview a document on their production site. We're using php-kit 1.5.12 at the moment.

The exception was:

The url "https%3A%2F%2Fmyrepository.prismic.io%2Fpreviews%2FpnXiQQFUif96wtGW" is not valid.

Coming from http-adapter, via the $response = $this->getHttpAdapter()->get($token); line of the previewSession method of Api.php.

The value of $token was the urlencoded URL as shown in the error message.

I'd submit a patch decoding the token in the preview method before trying to get it, but I'm not sure it's a bug here; perhaps it's a new bug in your server-side application instead. Please advise.

c0nst4ntin commented 1 year ago

Hey @tremby 👋🏼

I am currently trying to resolve most of the old Issues and PRs on this project. It seems like nobody has updated this topic since 2015.

Did you have any future troubles with this? Or perhaps have experienced this bug in a newer version of the package?

Since there haven't been any other comments or reactions on this I would guess that this might have been a bug solved already. Either in this package or maybe in the CMS.

Please let me know what you think. Should we close this? 🤔

tremby commented 1 year ago

I'm not currently in charge of maintaining any Prismic-powered sites, so I'm not about to try to reproduce the issue. I'm not even sure exactly which site I would have been working on back in 2015 when I opened this; there are a few options. So I don't know if this is solved or not, but I don't currently have an interest in it. Do with this ticket as you please.

c0nst4ntin commented 1 year ago

@tremby Okay, thank you for your feedback!

@lihbr Due to the age of the Issue I'd say we can close this for now. Do you have anything to add?

lihbr commented 1 year ago

Definitely @c0nst4ntin 👌