You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cloud Library stuck on "Loading" when iframe loads before admin-page.js #1211
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 load listener that hides the outer loader and shows the iframe;
the message listener that answers the DAM app's getUrl request with siteUrl.
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 load event already fired;
Dam.vue waits forever on its own "Loading..." screen, because it sends getUrl once, 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:1 while the outer loader is still visible, so the iframe had loaded;
forcing #om-dam visible from the console reveals the DAM app's own "Loading..." screen, so the getUrl handshake 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 the load event.
Service (Dam.vue): resend getUrl on an interval until setSource gets 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.
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).
✅ Fixed: with the same 4 s delay, the loader is gone and the frame shows "connected to" the site
In the links:
Steps 1 and 2 are already done, and the links open on Optimole → Cloud Library.
Optimole runs on a fake connection, so the frame shows a small stand-in page instead of the real Cloud Library. Like the real app, it asks the site for its address once and says "connected to " when the site answers.
The 4-second delay from step 1 is a must-use plugin there, not a Code Snippet.
Tools → QA Logs shows debug.log.
Reproduce on Optimole 4.2.20:
Snippets → Add New, title QA 1211: slow Cloud Library page, code below, then Save and Activate.
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
Try repeated Cloud Library reloads with a real connected account, 6x CPU throttling and the customer's SearchWP-inclusive plugin setup.
Insert a real Cloud Library image through the Optimole tab in an Image block and an Elementor Image Box with image replacement enabled.
Check the first Cloud Library load immediately after enabling the busy plugins; one simulated attempt did not show the frame, although subsequent attempts did.
Check the issue's suggested service-side retry and timeout when no site-address response arrives; that service change is outside this plugin PR.
Checks (2 passed · 2 not tested)
✅ When the Cloud Library iframe loads before a delayed footer script, the outer Loading overlay disappears and the iframe is shown.
✅ When the Cloud Library iframe asks for the site URL before a delayed footer script, it receives the site's URL and can leave its own loading state.
⏸️ On a busy admin with Chrome CPU throttled 6x, the real Cloud Library grid appears on every repeated reload.
⏸️ An image can be selected from the Optimole tab in the Media Library modal and inserted into the editor.
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