# Problem with Preview feature while setting this up on Magento using prismic-php-sdk

**URL:** <https://community.prismic.io/t/problem-with-preview-feature-while-setting-this-up-on-magento-using-prismic-php-sdk/12359>\
**Category:** Developing with Prismic\
**Tags:** php\
**Created:** [February 6, 2023, 5:48pm UTC](https://community.prismic.io/t/problem-with-preview-feature-while-setting-this-up-on-magento-using-prismic-php-sdk/12359 "2023-02-06T17:48:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![quyendam.2612](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/quyendam.2612/32/5559_2.png) [@quyendam.2612](https://community.prismic.io/u/quyendam.2612)\
**Post date:** [February 6, 2023, 5:48pm UTC](https://community.prismic.io/t/problem-with-preview-feature-while-setting-this-up-on-magento-using-prismic-php-sdk/12359/1 "2023-02-06T17:48:50Z")

</div>

![image](https://europe1.discourse-cdn.com/flex013/uploads/prismic/original/2X/d/d8c9bde4fa5ee19ab9aa7ca500aec7afcca62e9a.png)

Hi,

I have been struggling with the preview function while setting Prismic for my new project for a while.  
I only can get the new content after Publish a document, the toolbar doesn't work and as you can see in the screenshot above, I got a log of 404 returns so the Preview feature is impossible to load (I think).

Could anyone help to resolve this issue?

---

<div class="post-metadata">

**Author:** ![quyendam.2612](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/quyendam.2612/32/5559_2.png) [@quyendam.2612](https://community.prismic.io/u/quyendam.2612)\
**Post date:** [February 6, 2023, 5:53pm UTC](https://community.prismic.io/t/problem-with-preview-feature-while-setting-this-up-on-magento-using-prismic-php-sdk/12359/2 "2023-02-06T17:53:51Z")

</div>

To add,

- I have this module installed as well as other Magento websites with success Prismic integration [GitHub - elgentos/magento2-prismicio: Magento 2 Prismic integration](https://github.com/elgentos/magento2-prismicio/)
- I also don't see the io.prismic.previewCookie on my site (while it was supposed to be injected in by the php-sdk, correct?)

---

<div class="post-metadata">

**Author:** ![quyendam.2612](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/quyendam.2612/32/5559_2.png) [@quyendam.2612](https://community.prismic.io/u/quyendam.2612)\
**Post date:** [February 10, 2023, 2:16pm UTC](https://community.prismic.io/t/problem-with-preview-feature-while-setting-this-up-on-magento-using-prismic-php-sdk/12359/9 "2023-02-10T14:16:02Z")

</div>

Hi everyone,

Finally we have the preview function works on our local environment using php-sdk.  
But when we move to test on dev site with Basic Auth protection set at server level, I just got 401 error code on all preview from Prismic server, but the webhook works just fine. Check below

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/prismic/original/2X/4/4a7b52f2a8976bd1eca8da8f11167bd774d20489.png)  
 ![image](https://europe1.discourse-cdn.com/flex013/uploads/prismic/original/2X/d/dcc069510e2d99d4bba8295a442fcf9c2d14e20f.png)

Could this be caused by somethings from Prismic? or is it definitely something which need to be resolved from our server side?

Thanks

---

<div class="post-metadata">

**Author:** ![racheal.orukele](https://avatars.discourse-cdn.com/v4/letter/r/ee7513/32.png) [@racheal.orukele](https://community.prismic.io/u/racheal.orukele)\
**Post date:** [February 15, 2023, 3:38pm UTC](https://community.prismic.io/t/problem-with-preview-feature-while-setting-this-up-on-magento-using-prismic-php-sdk/12359/11 "2023-02-15T15:38:22Z")

</div>

Hello @quyendam.2612,

My apologies for just responding to you.

I have been trying to reproduce this issue on my end. Still, I have had no luck, I have reached out to our team to help with this, but in the meantime, can you provide me with any information to help reproduce this issue, like steps to reproduce, browser type and settings, etc., so I can assist you?

Thanks,  
Racheal.
