Docs / Troubleshooting

Troubleshooting & FAQ

Answers to the things that tend to go sideways — and the console escape hatches when they do.

The builder is stuck / frozen

Symptoms: no clicks register, an overlay appears on top of everything, keyboard shortcuts do nothing.

Fix, in order of escalation:

  1. Press Esc Esc (double-Escape). This clears any orphaned overlay and resets the selection.
  2. If that fails, open your browser console (F12) and run window.LhaiBuilder.emergencyReset(). Your page content is preserved; only the UI chrome is rebuilt.
  3. If that fails, reload the page. Your last saved draft survives — unsaved edits since the last save don't.

"No image description" / gray boxes

Gray boxes are LHAI saying "I couldn't generate this image." Most common causes:

"Image generation failed: {error}"

The exact error LHAI shows comes from the image engine. Common cases:

License not activating

LHAI talks to lhai.app over HTTPS to validate the license. If that call fails, activation fails.

  1. Confirm outbound HTTPS is allowed. Some managed hosts sandbox outbound traffic by default.
  2. If you run Wordfence / iThemes Security / similar, check their live traffic log for blocks to lhai.app.
  3. Try a different network. Corporate DNS occasionally blocks newer domains.
  4. If the Settings page shows a 500 error on save, check your PHP error log — the underlying failure is usually a curl timeout you can raise via WP_HTTP_BLOCK_EXTERNAL exclusions or by contacting your host.

Forms not sending email

Every submission is saved to the database, so you never lose a lead. Email is a separate layer.

Page 404 after publish

  1. Go to Settings → Permalinks. Don't change anything. Click Save Changes. This flushes WordPress's rewrite cache.
  2. Clear any full-page cache (WP Rocket, LiteSpeed, Cloudflare Full-Page) that might be serving a stale 404.
  3. If you renamed the page slug recently, a redirect plugin like Redirection can map the old URL to the new one.

Gutenberg editor shows an overlay

That's intentional — LHAI pages aren't safe to edit in Gutenberg because Gutenberg rewrites HTML it doesn't understand. Click Edit with LHAI to go to the correct editor. The small "I know what I'm doing — show raw code" link bypasses the overlay if you genuinely need Gutenberg (rare, and usually a sign something else should be happening).

Credits admin page looks locked

Correct. The plan-switcher and manual credit-adjustment forms are gated behind the LHAI_DEV_MODE constant. Without that constant, any WordPress admin could grant themselves unlimited credits locally — which is why the feature is off by default. To enable on a dev install:

// wp-config.php
define('LHAI_DEV_MODE', true);
Never enable LHAI_DEV_MODE on a production site. Real plan changes go through checkout on lhai.app, not through the plugin.

Useful console diagnostics

Open the browser console inside the builder and try these:

// Current builder state: current HTML, post ID, credit totals
window.LhaiBuilder.getState()

// Force-clear any orphan overlay
window.LhaiBuilder.emergencyReset()

// Inspect the Visual Editor selection store
LhaiEditorStore.get()

// Verify which credits endpoint the plugin is talking to
lhaiData.useCloud        // true = Cloud, false = BYOK