We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Any idea why preview would stop working?

Development and Programming

User 17qaJrYln's avatar
User 17qaJrYln
4 posts
about 2 months ago
User 17qaJrYln's avatar User 17qaJrYln

Any idea why preview would stop working (other than mercury retrograde!). I am logged in a Super Admin and cannot preview any channels. Preview displays The following errors were encountered

  • You are not allowed to edit the entries you selected.

I did upgrade to 7.5.21 today.

       
Tom Jaeger's avatar
Tom Jaeger
511 posts
about 2 months ago
Tom Jaeger's avatar Tom Jaeger

Live preview?

       
Tom Jaeger's avatar
Tom Jaeger
511 posts
about 2 months ago
Tom Jaeger's avatar Tom Jaeger

like when editing an channel entry? (just to confirm)

       
User 17qaJrYln's avatar
User 17qaJrYln
4 posts
about 2 months ago
User 17qaJrYln's avatar User 17qaJrYln

yes, I can edit, but the preview screen shows the error.

       
User XLYiWdAt's avatar
User XLYiWdAt
11 posts
about 2 months ago
User XLYiWdAt's avatar User XLYiWdAt

I got that when testing an msm thing where I had the wrong site in the index file.

       
User XLYiWdAt's avatar
User XLYiWdAt
11 posts
about 2 months ago
User XLYiWdAt's avatar User XLYiWdAt

any chance it’s msm?

       
User 17qaJrYln's avatar
User 17qaJrYln
4 posts
about 2 months ago
User 17qaJrYln's avatar User 17qaJrYln

No, very simple site.

       
User XLYiWdAt's avatar
User XLYiWdAt
11 posts
about 2 months ago
User XLYiWdAt's avatar User XLYiWdAt

Welp- weird one! @Bryan figured it out. Basically, apache sometimes strips out some header info before it hands it over to php. And in this case, we’re passing a token in that auth header. Which is why it failed.

Good news- adding this to your htaccess file said ‘please don’t do that’ and now it works:

SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

And we’re going to get that documented and some more informative error messaging for when that happens.

       
User 17qaJrYln's avatar
User 17qaJrYln
4 posts
about 2 months ago
User 17qaJrYln's avatar User 17qaJrYln

Geeze! Thank you for figuring it out! My hero!

       
User 2fJzqOiL's avatar
User 2fJzqOiL
1 posts
one month ago
User 2fJzqOiL's avatar User 2fJzqOiL

I was having the same problem. Just wanted to say thanks for posting the solution.

       
User pJ0b5J80's avatar
User pJ0b5J80
1 posts
one month ago
User pJ0b5J80's avatar User pJ0b5J80

Same here, and that fixed it. Many thanks.

       
User 188C2vcSm's avatar
User 188C2vcSm
3 posts
one month ago
User 188C2vcSm's avatar User 188C2vcSm

WOW! I stumbled on this too! I figured it was something with that token. Lifesaver.

       
User 188C2vcSm's avatar
User 188C2vcSm
3 posts
one week ago
User 188C2vcSm's avatar User 188C2vcSm

I encountered another problem with live preview.

  • You can only invoke Live Preview from domains that are configured as Base URL, CP URL, Site URL or added as allowed_preview_domains config override.
       
User 188C2vcSm's avatar
User 188C2vcSm
3 posts
one week ago
User 188C2vcSm's avatar User 188C2vcSm

Well with this new server implementation the problem was narrowed down to an Apache setting. In my case, it was due to a misconfiguration of our Cloudflare SSL/TLS settings used for the proxy. the HTTP_X_FORWARDED_PROTO was coming back as http. That alone would prevent the preview from working. Changing the TLS/SSL settings to full or full (strict) got that value to be https and preview worked. Special pat on the back goes to EE’s Bryan for identifying this.

       
User aridHq2J's avatar
User aridHq2J
21 posts
6 days ago
User aridHq2J's avatar User aridHq2J

Just had this same issue crop up on an established site, the htaccess line fixed it, thanks! Is there a reason it became an issue for so many people all of a sudden? Did something change in an EE upgrade?

       
1 2

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.