fix: restore AJAX search_models and selectize templates removed in c687d324#784
fix: restore AJAX search_models and selectize templates removed in c687d324#784superdav42 merged 1 commit intomainfrom
Conversation
…87d32 The 'Remove jumper in support of command palette' commit (c687d32) accidentally deleted the entire AJAX search infrastructure from class-ajax.php. The selectize-based model fields (used for page/user/ model selection across settings and edit pages) depend on the wu_search AJAX endpoint and the selectize dropdown templates rendered in the admin footer. Restores: search_models(), search_all_models(), search_wp_ultimo_setting(), search_wordpress_users(), render_selectize_templates(), and their hook registrations. Initializes $query array before first use to avoid PHP undefined variable notices.
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 27 minutes and 31 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Root CauseCommit c687d32 intended to remove the Jumper (replaced by the Command Palette), but the deletion was too aggressive — it removed the entire AJAX search infrastructure from
Changes
Affected Settings FieldsAll
Testing
Merged via PR #784 to main. aidevops.sh v3.6.235 spent 5m on this as a headless bash routine. |
🔨 Build Complete - Ready for Testing!📦 Download Build Artifact (Recommended)Download the zip build, upload to WordPress and test:
🌐 Test in WordPress Playground (Very Experimental)Click the link below to instantly test this PR in your browser - no installation needed! Login credentials: |
|
Performance Test Results Performance test results for e0224c1 are in 🛎️! Note: the numbers in parentheses show the difference to the previous (baseline) test run. Differences below 2% or 0.5 in absolute values are not shown. URL:
|
Summary
wu_searchAJAX endpoint and selectize dropdown templates that were accidentally deleted in c687d32 ("Remove jumper in support of command palette")type => 'model'settings fields (Default Registration Page, Default Login Page, etc.) which were rendering as empty/non-functional inputsRoot Cause
Commit c687d32 intended to remove the Jumper (replaced by the Command Palette), but the deletion was too aggressive — it removed the entire AJAX search infrastructure from
inc/class-ajax.phpthat all selectize-based model fields depend on:wu_ajax_wu_searchhook — the AJAX endpoint for all[data-model]selectize fieldsin_admin_footerhook — renders the<script type="text/html">dropdown templatessearch_models()— main search dispatcher (pages, users, settings, WP Ultimo models)search_all_models()— cross-model searchsearch_wp_ultimo_setting()— settings search for the sidebarsearch_wordpress_users()— user searchrender_selectize_templates()— selectize dropdown HTML templatesThe Command Palette uses its own REST API (
Command_Palette_Rest_Controller), so these AJAX methods are still needed by the selectize fields.Changes
inc/class-ajax.php: Restored all removed methods and hook registrations. Added$query = []initialization before first use to prevent PHP undefined variable notices (minor improvement over original).Affected Settings Fields
All
type => 'model'fields across the settings page:Testing
php -l inc/class-ajax.php— no syntax errorsvendor/bin/phpstan analyse inc/class-ajax.php— no errorsviews/ui/selectize-templates.php) exists