Repository navigation
Description
Description
The Cloud Library page (Optimole > Cloud Library) can stay on the "Loading..." screen forever. It is intermittent and depends on how fast the browser and the admin page are.
render_dashboard_page() in inc/dam.php outputs the hidden #om-dam iframe and the .om-dam-loader overlay. Both things that unblock the page are wired up in assets/src/media/admin-page.js, which is enqueued in the footer:
- the iframe
loadlistener that hides the outer loader and shows the iframe; - the
messagelistener that answers the DAM app'sgetUrlrequest withsiteUrl.
On a heavy admin page (many plugins) or a slower machine, the iframe can finish loading and Dam.vue (optimole-service) can send getUrl before the footer script has run. Both events are missed:
- the outer loader never hides, because the
loadevent already fired; Dam.vuewaits forever on its own "Loading..." screen, because it sendsgetUrlonce, with no retry or timeout.
Reproduction
Minimal harness in headless Chromium: the same markup as render_dashboard_page(), the real https://dashboard.optimole.com/dam iframe, and admin-page.js logic served from a footer script with an artificial delay.
| Footer script | iframe load |
getUrl sent |
listeners attached | Result |
|---|---|---|---|---|
| no delay | 1986 ms | 2084 ms | 6 ms | loads |
| 4 s delay | 1303 ms | 1356 ms | 4004 ms | stuck on Loading |
Customer evidence matches both halves:
- the WP Admin console shows a warning from
dashboard.optimole.com:1while the outer loader is still visible, so the iframe had loaded; - forcing
#om-damvisible from the console reveals the DAM app's own "Loading..." screen, so thegetUrlhandshake was missed.
Seen with Optimole 4.2.17, WP 7.1.4, Chrome 116 (macOS 10.13) and intermittently on Chrome 156 (macOS 14), with Elementor, Yoast, WPForms and SearchWP active. Works in Firefox and from the standalone dashboard Library.
Suggested fix
- Plugin: attach the listeners before the iframe can load (inline script right after the iframe, or register them from
admin_head), and/or on init check whether the iframe has already loaded instead of relying only on theloadevent. - Service (
Dam.vue): resendgetUrlon an interval untilsetSourcegets an answer, and show an error after a timeout instead of loading forever.
Workaround (verified in the harness)
Answer getUrl from admin_head on the optimole_page_optimole-dam screen: hide .om-dam-loader, show #om-dam, and post { siteUrl: get_site_url(), type: 'om-dam', context: 'browse' } back to event.source. A second reply from admin-page.js is harmless, because Dam.vue removes setSource after the first one.
Customer report: https://secure.helpscout.net/conversation/3496753537/
Activity
girishpanchal30 commentedon Nov 16, 2026
@milicavs i have fixed it with PR #1241
milicavs commentedon Nov 17, 2026
🧪 QA steps and test links
Optimole → Cloud Library can stay on the Optimole logo with "Loading..." forever. It happens when the admin page is slow (many plugins, a slow computer): the library frame finishes loading before the page is ready to answer it, so the page never reveals it.
Requires: a site connected to your Optimole account with Cloud Library on, and the Code Snippets plugin (step 1 makes the slow page happen every time).
b516245In the links:
debug.log.Reproduce on Optimole 4.2.20:
QA 1211: slow Cloud Library page, code below, then Save and Activate.Edge cases
Fix: #1241 (open)
pirate-bot commentedon Nov 17, 2026
QA agent — 🟡 Needs human QA · The simulated Cloud Library loading race is fixed; the real library still needs testing.
With a simulated slow admin page, the loader cleared and the library frame received the site address. The same scenario stayed stuck on the base build. A simulated cloud image also inserted and remained after saving, but the real library and real image insertion still need checking with a connected account.
Worth a human look
Checks (2 passed · 2 not tested)
Full report, evidence and session trail