Troubleshooting
Fixes for the problems people hit most: blank viewers, cross-origin PDFs, cache plugins, missing thumbnails, search and Secure Mode.
On this page
- The viewer is blank or keeps loading
- “Unable to load document (Cross-Origin Restriction)”
- “This document is password-protected.”
- Spread or flipbook shows only one page
- No thumbnails in the library
- Site search doesn't find words in a PDF
- Keyboard shortcuts don't work
- Pro: the protected file is still reachable
- Pro: “This document link has expired or is not valid for you.”
- Pro: analytics show nothing
- Still stuck?
The viewer is blank or keeps loading#
- Cache / optimisation plugin. Clear its cache. If it combines or delays scripts, exclude
foliora-viewer.js,pdf.min.jsandpdf.worker.min.js. See Performance & caching. - Viewer added after load (tabs, popups, AJAX). Call
FolioraViewer.bind( element )or useloading="lazy". - JavaScript error from another plugin. Open the browser console (F12). An error elsewhere on the page can stop all scripts.
- Wrong URL. Open the
fileURL in a new tab — it must download or display the PDF.
“Unable to load document (Cross-Origin Restriction)”#
The PDF is on another domain that doesn't allow your site to fetch it. Either upload the PDF to your Media Library (recommended), or ask the other host to send Access-Control-Allow-Origin: https://your-site.com for PDF files. The message includes a direct link so visitors can still open the file.
“This document is password-protected.”#
The PDF itself is encrypted. Readers can type the password in the viewer. Text extraction, thumbnails and previews are skipped for these files — upload an unprotected copy if you need them, and use protected links for password access instead.
Spread or flipbook shows only one page#
That is intended below 640 px of viewer width. Make the column wider or use width="100%".
No thumbnails in the library#
Open Foliora → Docs & Features and leave it open until every PDF is prepared. Thumbnails are generated by your browser there.
Site search doesn't find words in a PDF#
- Settings → Search and sharing → Site search must be on.
- The PDF must show Indexed on Docs & Features. No text means a scanned PDF — run OCR.
- The post must embed the PDF and be published. Run
wp foliora reindexafter bulk changes. - A search plugin that replaces WordPress search (SearchWP, Relevanssi…) may need its own setup to read post meta.
Keyboard shortcuts don't work#
Click inside the viewer first — shortcuts only apply to the viewer that has focus. Check that Settings → Toolbar → Keyboard shortcuts guide is on.
Pro: the protected file is still reachable#
Pro Settings → Protection shows whether the protected folder is blocked. On nginx add the shown rule to your server block and reload; on Apache make sure .htaccess files are allowed. Click Check again. See Secure Mode.
Pro: “This document link has expired or is not valid for you.”#
The signed link outlived its lifetime (default 12 hours) or was cached. Reload the page. If it happens often, exclude the page from your cache — Foliora already sends DONOTCACHEPAGE, but some hosts' server caches ignore it.
Pro: analytics show nothing#
Tracking must be on, you must test logged out (administrators aren't counted) without Do Not Track, and reads appear a few seconds after a viewer opens.
Still stuck?#
Post on the support forum with your WordPress, PHP and Foliora versions, the page URL and what the browser console shows.