What is your developer-dependent CMS actually costing you? Calculate your costs and get a full report
What is your developer-dependent CMS actually costing you? Calculate your costs and get a full report
Content Architecture
Fix the common Web Studio problems: a site that won't load in the frame, mixed content, preview showing published content, the SDK not loading, and fields that don't update live.
Find your symptom below. Each section lists the likely causes in the order worth checking. For the full setup, see Set Up Web Studio with Any Framework.
Most Web Studio problems show up in the browser console of the framed page. Open your browser's developer tools, pick your site's frame in the console's context menu, and look for messages that start with Web Studio SDK.
Symptoms: a blank frame, or a "refused to connect" or "refused to display" message where your site should be.
Your site's response headers forbid framing. Check what your deployment actually sends:
curl -sI https://your-preview-site.com/ | grep -i -E "x-frame-options|content-security-policy"
X-Frame-Options: DENY or SAMEORIGIN blocks Web Studio. Remove it and send Content-Security-Policy: frame-ancestors 'self' https://app.agilitycms.com; instead.frame-ancestors directive that doesn't list https://app.agilitycms.com blocks Web Studio. Add it.X-Frame-Options: SAMEORIGIN to responses that render antiforgery tokens. Set SuppressXFrameOptionsHeader = true in AddAntiforgery options.Web Studio checks your Content Security Policy when it loads your site and explains what to change if the policy blocks it.
Symptoms: the frame stays empty and the console mentions mixed content, or an insecure frame.
Agility runs on HTTPS, so the browser blocks any http:// page inside it.
https:// URL in Settings > Sitemaps.http://localhost is allowed, because browsers treat localhost as trusted. Other local hostnames, such as a custom .test domain over HTTP, are blocked.Symptoms: the frame loads, but it shows the live site. Saved changes don't appear.
The preview key isn't being applied. Work through the request from the outside in:
agilitypreviewkey. On Next.js this affects prerendered pages on Vercel and Netlify; both guides show the fix. Elsewhere, make sure requests that carry agilitypreviewkey, or your preview cookie, bypass the cache.AGILITY_SECURITY_KEY in the Next.js starter, AppSettings:SecurityKey in the .NET starter). If you compare keys yourself, replace spaces with + first, because + becomes a space when a query string is decoded.SameSite=None; Secure. Next.js draft mode already sets its cookie that way outside development. Some browsers, or browser settings, block cookies in cross-site frames entirely. If that's the cause, preview in a new tab instead.More detail for Next.js: Preview URL Lifecycle.
Symptoms: Web Studio shows a notice that the Web Studio SDK is not installed, or it doesn't follow you as you click between pages.
index.js from unpkg.com. A Content Security Policy script-src that doesn't allow https://unpkg.com blocks it, and so can a browser extension or network filter that blocks unpkg.Symptoms: the site loads with the SDK, but components aren't outlined and nothing opens for editing.
Check the console first. The SDK names the problem:
data-agility-guid="YOUR_INSTANCE_GUID" to <body>. It must be on <body>, not <html>.data-agility-page element": add data-agility-page with the numeric page ID to the element that wraps the page.Then check the markup:
<body>. A site reading content from one instance and showing another's GUID won't respond.data-agility-component with that component's content ID, not the page ID.data-agility-nested-listitem with its own content ID.Symptoms: outlines and editing work, but the preview doesn't change until you save.
data-agility-html="true" to the field element so the value is inserted as HTML.<img> inside the element tagged with data-agility-field (and any <source> in a <picture>). Put the attribute on a wrapper around the image.data-agility-field must be the field name from the model.Add data-agility-previewbar="true" to your preview bar's outer element. The value "true" is required; the attribute on its own isn't enough.