Cloud Library stuck on "Loading" when iframe loads before admin-page.js
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 56/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, php
- Ambito
- frontend
Direzione di ricerca
Start with render_dashboard_page() in inc/dam.php and the iframe and message listeners in assets/src/media/admin-page.js; trace how the iframe load and getUrl handshake are handled. The report also suggests a possible service-side change in Dam.vue, whose location is not given. Done means the Cloud Library loads when the iframe and footer script run in either order, with an error shown if the handshake times out.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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/
- Lingua principale
- PHP
- Stelle
- 74
- Fork
- 14
- Merge medio
- 1g 21h
- PR unite (30g)
- 30
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Codeinwp/optimole-wp
-
Page profiler endpoint fatals on PHP 8 when the request has no `b` (background selectors) fieldForse già presa @girishpanchal30 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
Codeinwp/optimole-wp#1204 · 4 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Background image with a gradient is not lazy-loaded on WordPress 7.1 (Quote, Pullquote, Verse, Post Content, Accordion)Forse già presa @girishpanchal30 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Codeinwp/optimole-wp#1203 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Page profiler never treats the detected LCP image as LCP, so it gets no fetchpriority="high" (stored ID is a string, compared with === to an int)Forse già presa @girishpanchal30 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
Codeinwp/optimole-wp#1202 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Account sign-up fatals when the Optimole API returns an empty or non-JSON responseForse già presa @girishpanchal30 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
Codeinwp/optimole-wp#1200 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Renaming an image leaves the old URL in comments and term descriptions, with "Unknown column 'ID'" database errorsForse già presa @girishpanchal30 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
Codeinwp/optimole-wp#1199 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Codeinwp/optimole-wp
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
wp-graphql/wp-graphql-woocommerce#1026 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
taskforcesh/bullmq#5038 ·
I maintainer di solito rispondono entro 1 giorno
-
ServiceMapMissingAnalyser reads @method in docblock prose as a tag and reports a phantom accessorApertaagent-ready area:static-analysis bug p3
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
gacela-project/gacela#1050 ·
I maintainer di solito rispondono entro 1 giorno