`visualizer_schedule_refresh_db` remains missing after Visualizer reactivation
Maintainer thường phản hồi trong vòng 1 ngày
@Alexia-Soare đang làm issue này rồi.
Từ ngày 21/9/2026.
Đá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
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- backend, databases, testing-qa
Hướng nghiên cứu
Bắt đầu trong classes/Visualizer/Module/Setup.php, đặc biệt là activate_on_site(), schedule_refresh_db_action() và unschedule_refresh_db_action(); sau đó kiểm tra các phương thức migration trong Upgrade.php và việc tải Action Scheduler trong index.php. Xem xét tests/test-schedule.php và tests/test-import.php, đồng thời tái hiện vấn đề với Action Scheduler 3.9.3 nếu có môi trường kiểm thử WordPress. Phần triển khai cần bao quát việc kích hoạt, vô hiệu hóa, migration và các trường hợp thiếu cả hai scheduler, để visualizer_schedule_refresh_db luôn hiện diện đáng tin cậy sau khi kích hoạt lại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Visualizer's recurring database-refresh action can remain absent after the plugin is deactivated and reactivated. Reactivation is expected to register visualizer_schedule_refresh_db, as documented, but the reported installation still has no scheduled action afterward. Database-backed charts therefore lack their recurring refresh trigger and may remain stale until manually refreshed.
Customer context
- Product / area: Visualizer scheduled database refresh
- Version: Visualizer 4.0.8; Visualizer Pro 2.0.2
- Environment: WordPress 7.1.1; PHP 8.3.24; single-site status not explicitly confirmed
- Integration / third party: Bundled Action Scheduler 3.9.3
- Reported error / symptom:
visualizer_schedule_refresh_dbis missing after a deactivate/reactivate cycle; no scheduling error appears in the available Visualizer log - Impact: Scheduled database-chart refreshes have no recurring trigger
- Integrity: Diagnostics reported that the installed free and Pro plugin files match their official releases
Reproduction notes
- Use Visualizer 4.0.8 with Visualizer Pro 2.0.2 and a database chart that depends on scheduled refreshes.
- Observe that
visualizer_schedule_refresh_dbis absent underTools > Scheduled Actions. - Deactivate and reactivate Visualizer once, following the product documentation.
- Return to
Tools > Scheduled Actionsand search for the hook. - Reported result: the action remains missing while other WordPress and plugin scheduled tasks work.
This is a customer-verified runtime reproduction. Repository inspection confirms a lifecycle path that can leave both schedulers empty, but the exact Action Scheduler state that triggered this installation's failure was not captured.
Diagnosis
Conclusion
The released lifecycle code has a confirmed gap that can produce and preserve the reported state. On the Action Scheduler path, Visualizer checks only whether a next action is reported, does not inspect the result of recurring-action creation, clears the WP-Cron fallback, and returns. If registration yields no usable action, both scheduling systems can be empty. Ordinary requests do not recreate the action, and the upgrade path runs only when a legacy WP-Cron event exists. The customer's intact 4.0.8 installation remained without the action after the documented reactivation procedure.
Where this likely occurs
classes/Visualizer/Module/Setup.php—Visualizer_Module_Setup::__construct()lines 42-58 registers activation/deactivation and the refresh callback but no recurring-action recovery hook.classes/Visualizer/Module/Setup.php—Visualizer_Module_Setup::activate_on_site()lines 211-218 invokes recurring-action registration during activation.classes/Visualizer/Module/Setup.php—Visualizer_Module_Setup::schedule_refresh_db_action()lines 486-504 callsas_next_scheduled_action(), conditionally callsas_schedule_recurring_action(), then clears the WP-Cron event without checking whether a usable Action Scheduler record was created.classes/Visualizer/Module/Setup.php—Visualizer_Module_Setup::unschedule_refresh_db_action()lines 509-516 removes both Action Scheduler and WP-Cron registrations during deactivation.classes/Visualizer/Module/Upgrade.php—Visualizer_Module_Upgrade::upgrade()lines 18-40 invokes migration only whenwp_next_scheduled()finds a legacy event, leaving the both-missing state untouched.classes/Visualizer/Module/Upgrade.php—Visualizer_Module_Upgrade::migrate_action_scheduler()lines 86-103 similarly clears WP-Cron after attempting Action Scheduler registration without validating the resulting action.index.php—visualizer_launch()lines 148-157 loads the bundled Action Scheduler entry point when the release artifact contains it.- Commit
bc14d4b8introduced the Action Scheduler migration afterv3.11.15; the affected behavior is present in released tagv4.0.8. This establishes the code history but does not by itself prove the customer's exact failure is a regression.
Engineering notes
- The free plugin owns
visualizer_schedule_refresh_db; the Pro add-on manages a separatevisualizer_schedule_importaction and does not override this lifecycle. - Action Scheduler 3.9.3 exposes a recurring-action assurance mechanism, but no corresponding Visualizer registration was found in v4.0.8.
- Action Scheduler's documented API indicates scheduling calls can return a zero action ID when creation fails. The release path does not distinguish that outcome before removing the fallback.
- An exact storage-level failure or stale Action Scheduler status has not been captured from the affected installation, so the immediate runtime trigger remains unknown.
- Open issue #1361 was read and rejected as a duplicate: it concerns a
wpdb::db_server_info()fatal on WordPress 5.3, not a missing action on WordPress 7.1.1. - Merged commit
1880fdd8is not in a release tag and adds recovery only when Action Scheduler is unavailable; its inspected branch returns early when Action Scheduler is usable, so it does not establish that this WordPress 7.1.1 report is already fixed.
Test coverage status
tests/test-import.php checks that the custom ten-minute interval exists, and tests/test-schedule.php covers scheduled import behavior. No relevant coverage was found during inspection for activation/deactivation registration, failed Action Scheduler creation, migration with both schedulers empty, or recovery of a missing visualizer_schedule_refresh_db action. The inspected Visualizer Pro scheduler tests concern the separate import action.
What to verify or explore next
- Reproduce with released Visualizer 4.0.8 and Action Scheduler 3.9.3 by removing all
visualizer_schedule_refresh_dbrecords, then running the documented deactivate/reactivate sequence. - Inspect all Action Scheduler statuses and logs for the Visualizer group immediately before and after reactivation.
- Capture the return value and resulting stored record from the recurring-action registration call during activation.
- Run activation, deactivation, migration, and both-missing recovery scenarios on single-site and multisite installations.
- Confirm behavior when another active plugin supplies a different Action Scheduler version.
Unknowns / follow-up
- The affected site's full Action Scheduler status inventory and system information were not available.
- It is unknown whether a stale, failed, canceled, or in-progress record influenced the next-action lookup.
- No local runtime reproduction was performed because the checkout lacks the built
vendor/directory and a matching WordPress test environment.
Confidence
Confidence: 88/100
The affected released code can leave the recurring refresh action absent: it does not verify Action Scheduler registration succeeded, clears the WP-Cron fallback on the Action Scheduler path, and has no recovery check when both records are missing. The customer reproduced the missing action after the documented reactivation procedure with release files verified intact.
Source: HelpScout #3456322130
Generated by bug-report-triage (ID: bug-report-triage_6aaf4c4cab58b6.52292839)
- Ngôn ngữ chính
- PHP
- Star
- 108
- Fork
- 29
- Merge trung bình
- 1 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 8
Chuẩn bị môi trường
- Không có Dockerfile hay 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/visualizer
-
feature-request-triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 64/100
Codeinwp/visualizer#1388 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Action Scheduler queue cleanup fatals with "Unidentified action" after concurrent deletionCó thể đã có người làm @Alexia-Soare đã nhận 10 ngày trước. Đang mởbug-report bug-report-triage
Codeinwp/visualizer#1369 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Action Scheduler async queue crashes on WordPress 5.3 with `wpdb::db_server_info()` errorCó thể làm lại được @girishpanchal30 đã nhận 46 ngày trước và không có pull request nào đang mở. Đang mởbug-report bug-report-triage crash-report
Codeinwp/visualizer#1361 · 5 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add a Default value for font settingsCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 25/100
Codeinwp/visualizer#1111 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
customer report doc-needed new feature
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Codeinwp/visualizer#1058 · 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/visualizer
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Automattic/static-site-importer#1879 ·
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 88/100
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 84/100
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 65/100
521xueweihan/HelloGitHub#3790 ·
-
[Bug] Feed date, title and author too long to fit inside article box on smaller screens, mobileĐang mởBug (unconfirmed) Good first issue 1️⃣ help wanted UI :art:
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
FreshRSS/FreshRSS#9360 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày