---
title: "Troubleshooting"
description: "Fix the Safari iframe sandbox error caused by frame-ancestors and other common preview rendering issues."
canonical_url: "https://kirby.tools/docs/live-preview/troubleshooting"
---

# Troubleshooting

> Fix the Safari iframe sandbox error caused by frame-ancestors and other common preview rendering issues.

## "Preview Failed"

When a render throws, the preview is replaced by a **Preview failed** button. Click it to render again – the failure is per attempt, and the section keeps working.

The button carries no detail. Open the browser console for the actual error, which is where the plugin logs it – usually the render request failing, because the template raised an error on the unsaved content it was handed.

## Sandbox Error in Safari

Safari enforces Content Security Policy (CSP) more strictly than other browsers. By default, Kirby's Panel sends `frame-ancestors 'none'`, which causes Safari to treat the Live Preview iframe as sandboxed. This results in a blocking UI dialog:

> Sandbox access violation: Blocked a frame at "https://…" from accessing a cross-origin frame. The frame being accessed is sandboxed and lacks the "allow-same-origin" flag.

To fix this, allow the Panel to be framed by its own origin by adding `frameAncestors` to your `config.php`:

```php [config.php]
return [
    'panel' => [
        'frameAncestors' => true
    ]
];
```

---

Every page of this site as Markdown: <https://kirby.tools/sitemap.md>
