Skip to content

Commit c528c5f

Browse files
authored
Merge pull request #1119 from ExpressionEngine/fix/live-preview-troubleshoot
Adding docs on troubleshooting Live Preview http auth issues
2 parents 19c7aa7 + b4f02c6 commit c528c5f

3 files changed

Lines changed: 21 additions & 2 deletions

File tree

docs/control-panel/create.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,12 @@ Saves the entry and returns the [Entry Manager](control-panel/entry-manager.md)
192192

193193
### Preview
194194

195-
A live preview of the entry is available if the `channel_prefs_preview_url` is set **or** the [Pages Module](add-ons/pages.md) is installed and a Page URI and template have been set.
195+
A live preview of the entry is available if the relevant channel's [Preview URL](control-panel/channels.md#settings-tab) is set **or** the [Pages Module](add-ons/pages.md) or [Structure](add-ons/structure/overview.md) is installed and configured with a URI and template.
196196

197197
If neither is set, the preview button will have an exclamation mark (!) and will link to channel preferences page where Preview URL can be set.
198198

199-
The preview will open a split screen that allows a live preview of edits. The template used to display the preview is based on the Page fields if set and the channel preview URL otherwise.
199+
The preview will open a split screen that allows a live preview of edits. The template used to display the preview is based on configured Pages/Structure fields if set and the channel preview URL otherwise.
200200

201201
When the preview is triggered, it is being displayed side-by-side with edit screen. The size of preview container can be adjusted with mouse dragging its border. The preview is dynamically being updated as you change the fields.
202+
203+
Live Preview does require the [HTTP Authorization Header be enabled](troubleshooting/error-messages.md#http-authorization-header-missing).

docs/installation/requirements.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ If you are hosted on an Apache server, the `AcceptPathInfo` option needs to be e
117117
- Ask your web host or server admin to enable the option
118118
- Set your site's URLs to use [query strings](general/url-structure.md#query-strings)
119119

120+
If on an Apache server and [Live Preview](control-panel/create.md#preview) shows an error message 'HTTP Authorization Header Missing', you will need to add this line of code to your [.htaccess file](installation/best-practices.md#1-create-an-htaccess-file)
121+
122+
```php
123+
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
124+
```
125+
120126
### URL Segment Support
121127

122128
If the [Server Compatibility Wizard](#server-compatibility-wizard) lists URL Segment Support as _Unsupported_, you will need to set your site's URLs to use [query strings](general/url-structure.md#query-strings).

docs/troubleshooting/error-messages.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,17 @@ This error---and similar warnings such as **"Warning: imagettftext(): Could not
4545

4646
If that is not an option, **Use TrueType Font for Captcha?** should be set to _No_ under `Settings --> CAPTCHA` or CAPTCHAs should be disabled altogether.
4747

48+
## HTTP Authorization Header Missing
49+
50+
ExpressionEngine returns the following error message when attempting to use [Live Preview](control-panel/create.md#preview): **"HTTP Authorization Header Missing"**
51+
52+
### Troubleshooting
53+
54+
The Authorization header is stripped by some Apache servers, causing an error rendering the Live Preview. This behavior may be overridden in your [.htaccess file](installation/best-practices.md#1-create-an-htaccess-file) by adding the following line:
55+
56+
```php
57+
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
58+
```
4859
## Warning: Cannot modify header information
4960

5061
ExpressionEngine returns the following warning: **"Cannot modify header information."**

0 commit comments

Comments
 (0)