Transfer-back failure can leave offloaded image URLs returning 404
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Bắt đầu với rollback_and_update_images() và start_processing_images() trong inc/media_offload.php, sau đó đọc các bài kiểm thử đường dẫn lỗi của media trong tests/test-media.php, đặc biệt là test_image_rollback() và test_rollback_retry_clears_errors(). Chạy bộ kiểm thử media với lỗi tra cứu hoặc tải xuống từ cloud được buộc xảy ra. Hoàn tất khi việc khôi phục thất bại không để lại trạng thái trang hoặc các tham chiếu hình ảnh ở trạng thái không nhất quán, với đường dẫn lỗi được bao phủ bằng kiểm thử.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
During transfer back from Optimole Cloud, an offloaded image can remain unavailable after its local restoration fails. The expected result is that the image remains recoverable and its page continues displaying it; the reported result is a 404 from both the Optimole delivery URL and the corresponding uploads URL. This leaves broken images in published content and can leave neither delivery path usable for the affected media.
Customer context
Product / area: Optimole, Image Storage transfer back
Version: The same account previously reported the offload failure on 4.2.9; the currently installed version is unknown. The inspected repository is 4.2.10.
Environment: WordPress site using Optimole Cloud image offloading; other WordPress and server versions are unknown.
Integration / third party: A cache plugin was mentioned by support; the screenshot also shows a page-builder environment, but relevance is unverified.
Reported error / symptom: Two images display as broken. Support observed 404 responses from their Optimole delivery URLs and original uploads URLs.
Impact: Published article content contains two unavailable images.
Reproduction notes
Reported sequence and status:
- The site previously used Optimole Cloud-only image offloading and was directed to transfer images back.
- Open the affected published article after that incident.
- Observe two broken image elements.
- Support reported that both the Optimole delivery URLs and corresponding uploads URLs returned 404.
Repository confirmation: the current rollback flow can continue page processing after cloud lookup or download failure leaves the local file unrestored. No isolated runtime reproduction was performed. Missing evidence includes the installed version, transfer status, rollback logs, and attachment metadata.
Diagnosis
Conclusion
The current rollback path contains a definite state-consistency defect matching the reported dual-404 symptom. Offloading removes the local files, while multiple transfer-back failures record an attachment error and skip restoration. For page-associated rollback work, the caller then updates the page regardless of restoration success. This can advance page state or persist an origin reference while the local file is still absent. Version 4.2.10 added retries for attachment errors, but the inspected flow still does not couple page advancement to successful restoration.
Where this likely occurs
- User-visible surface:
Optimole > Settings > Image Storage, duringTransfer back from Optimole Cloud, followed by image rendering on published content. inc/media_offload.php—Optml_Media_Offload::rollback_and_update_images()lines 840–904: cloud lookup or download failures setoptimole_rollback_errorand continue without restoring the local file.inc/media_offload.php—Optml_Media_Offload::start_processing_images()lines 2057–2066:update_page()runs afterrollback_and_update_images()without using its success result.tests/test-media.php—Test_Media::test_image_processed()lines 297–316: the normal offload test confirms the local attached file is removed.tests/test-media.php—Test_Media::test_rollback_retry_clears_errors()lines 360–393: 4.2.10 coverage confirms retry eligibility for failed attachments, but not page state or references after failure.- Git history:
40ec3aa4introduced clearing rollback errors on retry and shipped inv4.2.10;060fd3feis the 4.2.10 release commit. The unconditional page update predates that release and remains in the inspected tag.
Engineering notes
The same account previously reported broken thumbnails and dual 404s after enabling cloud-only storage on Optimole 4.2.9. That prior report led to the retry work tracked in closed issue Codeinwp/optimole-wp#1090. Current source retries attachments marked with rollback errors, but page processing and attachment restoration remain separate state transitions. This report concerns two residual images after that earlier incident; whether the site's transfer-back operation completed is unknown. Cache or page-builder involvement was not established and is not required for the confirmed control-flow defect.
Test coverage status
Happy-path offload and restoration coverage exists in tests/test-media.php, including Test_Media::test_image_processed(), Test_Media::test_image_sync(), and Test_Media::test_image_rollback() at lines 297–358. Test_Media::test_rollback_retry_clears_errors() at lines 360–393 covers re-querying failed attachments. No relevant coverage was found during inspection for a download or sideload failure followed by page processing, persisted page references after a failed restoration, or completion state with unresolved rollback errors.
What to verify or explore next
- Reproduce an offload followed by a forced cloud lookup or download failure during transfer back, then inspect the attachment file, page content, rollback metadata, and displayed URL.
- Repeat the transfer on 4.2.10 and confirm whether retry restores the attachment while the previously processed page remains consistent.
- Run the media test suite with failure-path coverage around
rollback_and_update_images()andstart_processing_images(). - Confirm whether the affected references are stored in normal post content or page-builder metadata.
- Compare the affected behavior on 4.2.9 and 4.2.10 to establish the remaining regression boundary.
Unknowns / follow-up
The current installed plugin version, transfer completion status, exact failing delivery URLs, attachment metadata, rollback logs, and page-builder storage location are unavailable. The screenshot confirms broken elements but does not expose network details. Customer-site access was not used.
Confidence
Confidence: 86/100
The missing logs control matches documented operation-scoped behavior, but the dual-404 image failure aligns with a definite rollback control-flow defect in the current plugin and with the same account's earlier offload/restore incident. Version 4.2.10 retries failed attachments, yet the inspected page-processing path can still advance after restoration failure.
Source: HelpScout #3401282656
Generated by bug-report-triage (ID: bug-report-triage_6a6988e6f0ed29.96483252)
- Ngôn ngữ chính
- PHP
- Star
- 74
- Fork
- 14
- Merge trung bình
- 2 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 22
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Codeinwp/optimole-wp
-
Image URL replacement passes an integer cache token to the Optimole SDKCó thể đã có người làm @selul đã nhận 2 ngày trước. Đang mởbug bug-report bug-report-triage crash-report
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
Codeinwp/optimole-wp#1187 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Image parser uses a data: placeholder from data-src as the image URL, so the real src misses srcset enhancementCó thể đã có người làm @selul đã nhận 2 ngày trước. Đang mởbug bug-report
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 56/100
Codeinwp/optimole-wp#1186 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
customer report feature-request-triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Codeinwp/optimole-wp#1179 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add setting to disable Optimole URL rewriting for social meta tags (og:image / twitter:image)Đang mởcustomer report feature-request-triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 54/100
Codeinwp/optimole-wp#1178 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug bug-report bug-report-triage crash-report
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Codeinwp/optimole-wp#1163 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Codeinwp/optimole-wp
Issue tương tự
-
sync-en
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày
-
bug-report bug-report-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Codeinwp/templates-patterns-collection#539 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
WINBIGFOX/TimeScribe#143 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
coollabsio/coolify#12287 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 3 ngày